PY-19242 Add autocompletion for % format strings

* Extract separate completion provider for formatted string arguments add patterns
* Add tests
This commit is contained in:
Valentina Kiryushkina
2016-10-17 18:15:26 +03:00
parent 3601222476
commit 3a2a8f142c
18 changed files with 336 additions and 93 deletions
@@ -0,0 +1 @@
r"{completed}".format(completed="hood")
@@ -0,0 +1 @@
r"{compl<caret>}".format(completed="hood")
@@ -0,0 +1 @@
"%(completion)s" % dict(completion)
@@ -0,0 +1 @@
"%(completion)s" % dict(complet<caret>)
@@ -0,0 +1 @@
"format: %(fooo)s" % {"boo":1, "fooo"}
@@ -0,0 +1 @@
"format: %(fooo)s" % {"boo":1, "foo<caret>"}
@@ -0,0 +1 @@
"format: %(fooo)s" % {"fooo"}
@@ -0,0 +1 @@
"format: %(fooo)s" % {"fo<caret>"}
@@ -0,0 +1 @@
"to be %(completed)s" % dict(completed="smth")
@@ -0,0 +1 @@
"to be %(comple<caret>)s" % dict(completed="smth")
@@ -0,0 +1 @@
"format: %(completion)s" % {"completion": "smth"}
@@ -0,0 +1 @@
"format: %(complet<caret>)s" % {"completion": "smth"}
@@ -0,0 +1 @@
r"%(completion)s" % dict(completion="smth")
@@ -0,0 +1 @@
r"%(compl<caret>)s" % dict(completion="smth")
@@ -0,0 +1 @@
"to be %(completion)s" % dict(completion="smth")
@@ -0,0 +1 @@
"to be %(complet<caret>)s" % dict(completion="smth")