Mikhail Golubev
05e9418a47
PY-8174 Include the new warning, the quickfix is bound to, in the test data
2017-06-05 21:20:45 +03:00
Valentina Kiryushkina
f1d8ea5c82
Fix for unicode escapes: use getText() instead of getStringValue()
2017-05-15 14:37:57 +03:00
Semyon Proshev
986cfc4921
PY-22971 Fixed: Support @typing.overload in regular Python files, not only in Python stubs
...
Update PyRemoveParameterQuickFix to remove parameter from overloads.
2017-05-13 00:17:47 +03:00
Mikhail Golubev
532e18e4d9
Add "Py" prefix to AddImportQuickFixTest and several other quick fix tests
...
otherwise it's easy to overlook it especially considering that there is
also (confusingly) PyAddImportTest
2017-03-21 18:10:12 +03:00
Mikhail Golubev
471ab5b5c3
PY-22422 Consider new code style settings in actions that might create/update "from" imports
...
In particular, in "Import ..." quickfix, smart completion for class
names and in a few refactorings.
2017-03-06 17:15:58 +03:00
Mikhail Golubev
190fe91332
PY-21563 Join "from" imports with the same origin if "Import ..." quickfix is run from type comment
2016-11-25 17:45:24 +03:00
Semyon Proshev
42fc094e4e
PY-16098 Fixed: Warn that async and await will become keywords in Python 3.7
...
Warn about variables, classes and functions called "await" or "async" in Pythons 3.5 and 3.6. Suggest quick fix to rename such nodes
2016-10-07 12:21:53 +03:00
Mikhail Golubev
e612272559
Fix test: when sorting import candidates use qualified names as tie breaker
...
if lengths of both qualified names are the same. Previously their order
and hence the candidate selected in tests were unpredictable due to
this flaw.
2016-09-28 20:39:05 +03:00
Lada Gagina
c9a96f59ff
PY-16055 Add quickfix and tests for functions with incorrect return annotation
...
Add quickfix for functions whose return type doesn't match their annotated type.
2016-08-30 17:12:55 +03:00
Mikhail Golubev
81e5aa1891
PY-19975 Check all resolved symbols in __init__.py to find shortcut name for element
...
The root of the problem however is that PythonPathCache often contains
relative qualified names as keys. It leads to the situation where
QFrame module is resolved to the corresponding files both in PyQt and
PySide. We should probably either omit such resolve result in
PythonPathCache entirely or use absolute qualified names for them as
keys.
2016-07-07 11:54:45 +03:00
Mikhail Golubev
1c3b81b322
PY-19773 Remember already suggested importable elements using their canonical names
...
The problem was caused by the fact that we ignore imported element
"request" in "flask/__init__.py" at first and mark this module as
already checked (using the name "flask") and then refuse to suggest
"flask.globals.requests" because its canonical qualified name is
"flask.request".
I've also added a test on importing functions of os.path module since
it's a well-known case where several different symbols should be imported
using the same name (provided by PyStdlibCanonicalPathProvider).
My first attempt to fix the problem by saving actual import candidates
instead of their canonical qualified names has broken exactly this
scenario.
2016-06-30 08:50:59 +03:00
Mikhail Golubev
c881af1428
PyUtil#removeQualifier handles possible whitespace before the dot
2015-10-05 16:00:35 +03:00
Andrey Vlasovskikh
7b882f5a49
Compatiblity inspection updated to include Python 3.5 argument unpacking generalizations
2015-09-14 23:14:00 +03:00
Andrey Vlasovskikh
795bc33729
Moved incorrect arguments checks to compatibility visitor
...
These checks will be Python version dependent due to additional
unpacking generalizations of Python 3.5.
The checks deal with only arguments, not argument-parameter mapping.
We're sure about our code analysis here so we've made them error
checks instead of warning checks.
2015-09-14 22:08:38 +03:00
Ekaterina Tuzova
b0384b7f67
fixed PY-15437 Exception when converting method to function
2015-04-23 15:33:33 +03:00
Mikhail Golubev
31eeb5e84a
Fix test data in several tests that failed after PyUtil#deleteElementSafely was introduces
...
* `pass` is consistently inserted on the new line now
* excess spaces left after element was deleted are removed
Use PyUtil#deleteElementSafely in pull, push and extract superclass
refactoring implementations.
It turned out that all problems with whitespaces left after we moved
function are rooted in awkward implementation of PyFunctionImpl#delete()
that delegated to plain AST manipulation and thus ignored
usual additional reformatting step. I removed it and it's allowed to
clean a lot of test files and remove the code that was added previously
exactly for this purpose in PyMoveSymbolProcessor.
2015-04-08 13:46:26 +03:00
Mikhail Golubev
a5b900a662
PY-14733 Add explicit line break and indentation before empty statements list
2014-12-17 20:31:04 +03:00
Ekaterina Tuzova
f599645e1f
fixed PY-12920 **kwargs in constructor parameters disappear after "Add super class call" quick fix
2014-05-12 12:46:55 +04:00
Ekaterina Tuzova
a249d4eda3
fixed PY-12825 Remove unused parameter: do not allow to remove last argument after star when refactoring function with keyword-only arguments
2014-05-08 13:30:57 +04:00
Ekaterina Tuzova
1a1578308b
fixed PY-12824 Remove unused parameter: usages in function calls are not updated
2014-05-06 19:32:54 +04:00
Ekaterina Tuzova
7c1c4b1b22
fixed PY-12825 Remove unused parameter: do not allow to remove last argument after star when refactoring function with keyword-only arguments
2014-05-06 19:18:49 +04:00
Ekaterina Tuzova
520b4bee9c
fixed PY-12826 Remove unused parameter: remove references in the docstrings
2014-05-06 19:08:34 +04:00
Ekaterina Tuzova
5baf0cd4f8
fixed PY-12500 Instance attribute defined outside init: generate python 3 super call without arguments for python 3 interpreters
2014-04-09 15:54:53 +04:00
Ekaterina Tuzova
068794c6dc
added PY-8367 Quickfix for removing unused parameter or variable
2014-03-13 18:16:42 +04:00
Ekaterina Tuzova
71cbc6e3ed
added update property signature quick fix to the Property definitions inspection
2014-03-13 12:13:06 +04:00
Ekaterina Tuzova
0e9cbc8561
added convert to new-style class quick fix to the Old-style class contains new-style class features inspection
2014-03-12 20:31:33 +04:00
Ekaterina Tuzova
dd6b3a2aa0
added Remove call quick fix to the Trying to call a non-callable object inspection
2014-03-12 19:50:39 +04:00
Ekaterina Tuzova
db3f6c79b5
replace tuple with list quick fix for tuple item assignment inspection
2014-03-12 19:04:04 +04:00
Ekaterina Tuzova
12f048b6d6
Wrap with Exception quick fix for Raising a string exception inspection
2014-03-12 18:34:58 +04:00
Ekaterina Tuzova
5ee2cf20c5
added remove return statement quick fix for the return from init inspection
2014-03-12 18:07:29 +04:00
Ekaterina Tuzova
34c32eaa91
added remove argument quick fix to the Incorrect call arguments inspection
2014-03-12 17:10:24 +04:00
Ekaterina Tuzova
ee5f16edd6
added Add Exception base class quick fix to the Exception doesn't inherit from standard ''Exception'' class inspection
2014-03-12 12:49:04 +04:00
Ekaterina Tuzova
37c7fcabec
removed state from add super call quickfix, added tests
2014-03-11 18:23:53 +04:00
Ekaterina Tuzova
378b22a23d
added format specifier quick fix for the python string format inspection
2014-03-11 17:40:20 +04:00
Ekaterina Tuzova
8dd9cc4f49
added remove dictionary key quick fix for the Dictionary contains duplicate keys inspection
2014-03-11 15:19:31 +04:00
Ekaterina Tuzova
aea8f6d532
added move except clause quick fix for the Bad except clauses order inspection
2014-03-11 15:00:47 +04:00
Ekaterina Tuzova
b1977eac7a
added Remove assignment quick fix for the Assigning function call that doesn't return anything inspection
2014-03-11 14:02:07 +04:00
Ekaterina Tuzova
7438ce848b
added create property quick fix for the property access inspection
2014-03-07 18:31:00 +04:00
Ekaterina Tuzova
823897267c
added Make public quick fix for the protected member access inspection
2014-03-07 16:37:23 +04:00
Ekaterina Tuzova
155f99a1a3
added create property quick fix
2014-03-07 16:14:24 +04:00
Ekaterina Tuzova
25c45d18fc
added rename quick fix to the protected member inspection
2014-03-07 14:07:52 +04:00
Ekaterina Tuzova
48eef72597
fixed test data
2014-01-17 16:00:33 +04:00
Ekaterina Tuzova
ddda8c9cef
add field after super call
2014-01-15 18:32:25 +04:00
Ekaterina Tuzova
bf35035a08
fixed test data
2014-01-13 15:12:54 +04:00
Ekaterina Tuzova
ce7c8cdc46
fixed tests since we don't propose to make static decorated method
2013-12-02 21:25:20 +04:00
Ekaterina Tuzova
33a3ecf730
PY-9365 Make function from method: leads to unresolved attribute reference for method usages in class
2013-10-10 18:25:33 +04:00
Ekaterina Tuzova
ddb0d98b13
extracted augment assignment tests
2013-10-10 17:45:17 +04:00
Ekaterina Tuzova
14f55f9984
PY-10988 Instance attribute defined outside __init__ with property setter
2013-10-04 20:26:00 +04:00
Ekaterina Tuzova
6e563e5380
fixed PY-9365 Make function from method: leads to unresolved attribute reference for method usages in class
2013-09-23 20:56:32 +04:00
Ekaterina Tuzova
92415cade1
fixed PY-9263 Move attribute to init method: add super class call when moving to not yet existing init
2013-09-09 15:46:27 +04:00