diff options
author | Tor Norbye <tnorbye@google.com> | 2014-01-27 09:36:41 -0800 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2014-01-27 09:36:49 -0800 |
commit | 809cb3e73653399e59e45e0b10749a8e37b85a75 (patch) | |
tree | 8aa7262925cc4eed902baa00f2193e98f6bb64e0 /python/testData | |
parent | e2d6089d43d7ac1f62bafe06638d5ac2c21f5283 (diff) | |
download | idea-809cb3e73653399e59e45e0b10749a8e37b85a75.tar.gz |
Snapshot 9e6329d622cc9649c9c035f28faddc29564a5b7a from idea/133.696 of git://git.jetbrains.org/idea/community.git
9e6329d: IDEA-119035 Select All shortcut for any table on mac with Darcula
7642139: [log] IDEA-116322 Fix structure filter for multiple roots
5fe2227: [log] refactor: group filters before passing them to providers
a9bda1e: Problem with several users in log filter fixed.
bb353f3: [log] IDEA-119316 Fix "go to commit" if there are log filters
2825dd1: IDEA-119467 Gradle: auto discovery of buildSrc project (cherry picked from commit 3cb5420)
ca05350: Gradle: respect the order of dependencies (cherry picked from commit dca7107)
8a1d099: IDEA-115351 Idea UI hangs after performing Move Module to group (cherry picked from commit 673ed61) [r=Maxim.Mossienko]
9f006a4: NPE fix (cherry picked from commit 1eb3644)
2089b40: Gradle: test data fix (cherry picked from commit c864c4b)
6208324: IDEA-119336 Gradle build files: build.gradle scripts are checkout from Perforce even if the file is not changed (cherry picked from commit 3234c0b)
d1d776c: IDEA-119467 Gradle: auto discovery of buildSrc project IDEA-98930 IDEA does not resolve dependencies in Gradle buildSrc/ project (cherry picked from commit 0982afc)
6f6c403: Gradle: dependencies scope merge and sourceSets type handling updated related issues: IDEA-119365 Gradle import does not respect model customisations IDEA-118280 Gradle import: IDEA detect java folder as a resource folder IDEA-117668 IDEA v13 spontaneously changes additional test source root to source root (cherry picked from commit 68bfa5e)
a7f9d6f: Gradle: respect module build classpath for build scripts resolving review: http://crucible.labs.intellij.net/cru/CR-IC-4038
742c670: isEAP = false, time to release 13.0.2
3a5cfc7: add profiling parameters to the right part of the classpath (has been broken after Launcher was introduced)
ca42a66: fixed empty headers and import (dependant in language level) for qt, gtk... skeletons.
ba68876: update copyright in artworks
7c12cb3: IDEA-119619 Settings / Language Injections: project level XML tag injection loses Sub-Tags value on IDE restart
f7bd727: don't call robot on alt on Windows and when window is inactive (cherry picked from commit 0fe2cac)
8b62b1e: add WinXP definition (cherry picked from commit dde1494)
62c528a: consume Alt events on WinXP in default handler to avoid WindowsRootPaneUI.AltProcessor (cherry picked from commit f14aab9)
20c7faa: support table decoration on IntelliJ laf (cherry picked from commit 04425c9)
7dc2f34: IDEA-118211 (cherry picked from commit 55ee980) [r=Peter.Gromov]
b15f65d: fixed PY-11823 Test Runner detection in settings doesn't pick up just installed test runner
7a2bec9: Fixed dedent in case of tabs ( PY-10120).
56b5f81: Python keywords extracted. Cleanup.
f195253: Fixed test data to satisfy PEP8.
6b6bbc1: Make right par indent=none in import statement (PY-9075).
6a39911: Make continuation indent after continuation in indenting statement (PY-9573).
cf19307: Test for PY-9573
fb5186fa: Handle 'mode' as a keyword argument to open() as well
27a4d26: Detect text or binary I/O in pathlib.Path.open()
a5600e3: Return instance types for instance types of superclasses
f56e9b1: fixed PY-11837 nose test runner errors while formatting a test error
7420dd6: Nullity annotations
97ffd71: fixed test data
d0eb725: fixed test data
326185d: generator: do not drop the whole module in case there are broken __repr__ defined
982687a: performance for generator: Split big generated modules (like _Gtk, PyQt) into smaller ones
af679a5: Simplified always true condition
3174b9c: Extracted PyClassTypeImpl.findProperty()
777280e: Added 'inherited' parameter to PyClass.findProperty()
d5d8b23: Python skeletons class members provider now can provide new overridden members
6775ed3: Fixed code insight for returning 'self' in base class methods (PY-10977, PY-11413)
d4c641f: Fix formatter to add two blank lines between declarations with comment (PY-9923).
9c8134a: add field after super call
37813c6: Revert "Detect SQL fragments only in the beginning of string literals" (PY-11828)
9d5973f: Use default charset as python console encoding.
7fed382: Added Python 3.4 modules to the stdlib modules list
c772246: Don't ignore unused attributes of empty constructors (PY-7527)
91ae6bf: Fixed NPE in PyUnusedLocalInspectionVisitor.visitPyCallExpression()
464ae1c: fixed PY-11800 Parameter unfilled false positive for decorators with '*' arguments.
e3ec532: fixed test data
31bb1dd: fixed add field declaration to the beginning of __init__
2910f7d: fixed EA-52897 - CCE: ImportToggleAliasIntention$.execute
cca9133: fixed EA-53046 - NPE: PyExtractMethodUtil.a
2fcf769: fixed quickdoc test
fcf329f: fixed editing test
859c599: fixed testdata
ab7782a: fixed PY-11765 @ivar and @type in class documentation cause PyUnresolvedReferences inspection to file
8303e4f: IDEA-112303 Tool Windows Quick Access button: impossible to select item in list by mouse (cherry picked from commit 8e2ce03)
b206d2d: fix NPE
d923a83: Trying to fix EA-51665 - assert: FTManager.createAndStoreBundledTemplate (cherry picked from commit 47dee08) +review CR-IC
72fa58b: Add additional diagnostic to investigate EA-51665 (assert: FTManager.createAndStoreBundledTemplate). (cherry picked from commit a5e4cf4) +review CR-IC
6548f1a: java: incorrect parsing of bounds in class files fixed
8f5b22c: EA-42899 - CCE: XmlLanguageInjectionSupport.doEditInjection & cleanup
2a882e0: EA-53406 - IAE: ServiceManager.getService
ed41c77: WI-13685 PhpStorm doesn't save project name CR-PS-181
2c3ccec: IDEA-119445 Remove first slash in "copy reference" (cherry picked from commit 298bb04)
50bf901: IDEA-119153 file search too wide for users folder (cherry picked from commit 37521f0)
8ab790b: IDEA-119470 File and code templates: changes gone when switching tabs (cherry picked from commit 21cdea3)
7402508: EA-53393 - IOOBE: DomAnchorImpl.createAnchor (missing cherry pick)
f6ab2da: Bug fix: IDEA incorrect handle escaping.
c78400d: IDEA-105253 Missing icon for Thread dumps view
21b6f91: IDEA-104735 Dracula: INVALID string have not dracula style red color (cherry picked from commit 4a5e793)
53885c2: Don't show active editor in recent files
6cf74eb: IDEA-104706 Remove currently active file from "Recent Files" popup (cherry pick from master)
ffef358: IDEA-119406 IDEA make corrupts files when performing Maven resource filtering (default value of escapeString is null)
b8e9ab1: IDEA-119406 IDEA make corrupts files when performing Maven resource filtering (cherry picked from commit 5b6b3f6) +review CR-IC
d3dd646: EA-53308 - CCE: DfaVariableValue.<init> (cherry picked from commit 32a579d)
10f83e0: external build for artifacts: added API to filter contents of directory extracted from jar file [rev by Michael Golubev]
b7f4af0: make nonDefaultProject="true" really work
0bebc13: cosmetics
94e0a24: Merge remote-tracking branch 'origin/133' into 133
85cae29: IDEA-119347 ../jre64 JDK not being picked up by idea64.exe
2dd77af: IDEA-117127 Editor: Throwable on Select word at caret inside plain text (cherry picked from commit 2e3a0d8)
0a5e3ad: IDEA-117555 Search everywhere dialog is being closed immediately (cherry picked from commit ba8037d)
520da57: fix getDisplayName nullability assertion
0663734: IDEA-111122 remove attached jar artifact coming from "apklib" dependency from the dependencies of app module: users add it to deploy jar to Maven repository in addition to "apklib" file, but we don't need to add it to the classpath, because it leads to class duplication [rev=sergey.evdokimov]
c1fb468: IDEA-79522 need ability to set display names for xml attribute and xml tag language injections
3ae70b9: IDEA-119163 "Language Injections" settings should use toolbar decorator in the same way as other
50c78e9: IDEA-117327 Add a setting to switch off autopopup completion item selection by Enter (cherry picked from commit 84ddafc)
ae5ce9b: groovy debugging agent that produces less garbage (cherry picked from commit c7af9fe)
f6682f7: Roll-back FileChooserDescriptor API change.
1c64249: Merge remote-tracking branch 'origin/133' into 133
b293f8c: SearchEverywhere doesn't work on Linux
07b98c1: IDEA-74428 Ability to turn on log debug categories from the GUI
4257f6f: CR-IU-511 make abstract class abstract & leave getPresentableText mandatory
7cac7b7: allow to turn off suggestion to create a file when creating a directory with file-like name (IDEA-118250) (cherry picked from commit 5d81e8d)
acb9db2: don't show parameter info for invisible editors (EA-53161 - NPE: ParameterInfoComponent.<init>) (cherry picked from commit fb24d98)
e6bfbbf: the users don't care if we're preparing editors to open (IDEA-115130) (cherry picked from commit 9a116de)
3f1ebf3: rethrow PCE from KeyedExtensionFactory reflection (cherry picked from commit df8967b)
Change-Id: I8083d21f3faff4f899c53a5dea2710713dc1a2a9
Diffstat (limited to 'python/testData')
26 files changed, 182 insertions, 18 deletions
diff --git a/python/testData/formatter/commentBetweenClasses_after.py b/python/testData/formatter/commentBetweenClasses_after.py index b8523949c0b6..e97c76b04590 100644 --- a/python/testData/formatter/commentBetweenClasses_after.py +++ b/python/testData/formatter/commentBetweenClasses_after.py @@ -2,6 +2,7 @@ class T1(object): def m1(self): pass + # comment about T2 class T2(object): diff --git a/python/testData/formatter/continuationIndentInIndentingStatement.py b/python/testData/formatter/continuationIndentInIndentingStatement.py new file mode 100644 index 000000000000..5822bc4971bb --- /dev/null +++ b/python/testData/formatter/continuationIndentInIndentingStatement.py @@ -0,0 +1,31 @@ +if True \ + or False: + pass +elif \ + False: + pass + +for i in \ + range(1, 100): + pass + +with open('file1') as file1, \ + open('file2') as file2: + pass + + +class \ + A(object): + pass + + +def \ + foo(): + pass + + +try: + pass +except \ + AttributeError: + pass
\ No newline at end of file diff --git a/python/testData/formatter/continuationIndentInIndentingStatement_after.py b/python/testData/formatter/continuationIndentInIndentingStatement_after.py new file mode 100644 index 000000000000..f38dd5199edd --- /dev/null +++ b/python/testData/formatter/continuationIndentInIndentingStatement_after.py @@ -0,0 +1,31 @@ +if True \ + or False: + pass +elif \ + False: + pass + +for i in \ + range(1, 100): + pass + +with open('file1') as file1, \ + open('file2') as file2: + pass + + +class \ + A(object): + pass + + +def \ + foo(): + pass + + +try: + pass +except \ + AttributeError: + pass
\ No newline at end of file diff --git a/python/testData/formatter/indentParensInImport.py b/python/testData/formatter/indentParensInImport.py new file mode 100644 index 000000000000..ab20f1b5571b --- /dev/null +++ b/python/testData/formatter/indentParensInImport.py @@ -0,0 +1,3 @@ +from some.module import ( + thing + )
\ No newline at end of file diff --git a/python/testData/formatter/indentParensInImport_after.py b/python/testData/formatter/indentParensInImport_after.py new file mode 100644 index 000000000000..2ad9216af71c --- /dev/null +++ b/python/testData/formatter/indentParensInImport_after.py @@ -0,0 +1,3 @@ +from some.module import ( + thing +)
\ No newline at end of file diff --git a/python/testData/formatter/twoLinesBetweenTopLevelDeclarationsWithComment.py b/python/testData/formatter/twoLinesBetweenTopLevelDeclarationsWithComment.py new file mode 100644 index 000000000000..a0f52904114e --- /dev/null +++ b/python/testData/formatter/twoLinesBetweenTopLevelDeclarationsWithComment.py @@ -0,0 +1,18 @@ +class A(object): + pass + +#comment +def one(): + pass + +# comment +def two(): + pass + +#comment +class B(object): + pass + +#comment +class C(object): + pass
\ No newline at end of file diff --git a/python/testData/formatter/twoLinesBetweenTopLevelDeclarationsWithComment_after.py b/python/testData/formatter/twoLinesBetweenTopLevelDeclarationsWithComment_after.py new file mode 100644 index 000000000000..d582036d8654 --- /dev/null +++ b/python/testData/formatter/twoLinesBetweenTopLevelDeclarationsWithComment_after.py @@ -0,0 +1,22 @@ +class A(object): + pass + + +#comment +def one(): + pass + + +# comment +def two(): + pass + + +#comment +class B(object): + pass + + +#comment +class C(object): + pass
\ No newline at end of file diff --git a/python/testData/inspections/FieldFromUnusedParameterKeyword.py b/python/testData/inspections/FieldFromUnusedParameterKeyword.py deleted file mode 100644 index 35851f0f87df..000000000000 --- a/python/testData/inspections/FieldFromUnusedParameterKeyword.py +++ /dev/null @@ -1,3 +0,0 @@ -class A: - def __init__(self, <weak_warning descr="Parameter 'foo' value is not used">f<caret>oo=True</weak_warning>): - print('hello')
\ No newline at end of file diff --git a/python/testData/inspections/FieldFromUnusedParameterKeyword_after.py b/python/testData/inspections/FieldFromUnusedParameterKeyword_after.py deleted file mode 100644 index 7e0d6627cc00..000000000000 --- a/python/testData/inspections/FieldFromUnusedParameterKeyword_after.py +++ /dev/null @@ -1,4 +0,0 @@ -class A: - def __init__(self, foo=True): - print('hello') - self.foo = foo
\ No newline at end of file diff --git a/python/testData/inspections/FieldFromUnusedParameter_after.py b/python/testData/inspections/FieldFromUnusedParameter_after.py deleted file mode 100644 index 7405ba3ec789..000000000000 --- a/python/testData/inspections/FieldFromUnusedParameter_after.py +++ /dev/null @@ -1,4 +0,0 @@ -class A: - def __init__(self, foo): - print('hello') - self.foo = foo
\ No newline at end of file diff --git a/python/testData/inspections/PyArgumentListInspection/decoratorsPy3K.py b/python/testData/inspections/PyArgumentListInspection/decoratorsPy3K.py new file mode 100644 index 000000000000..07e9942700b1 --- /dev/null +++ b/python/testData/inspections/PyArgumentListInspection/decoratorsPy3K.py @@ -0,0 +1,7 @@ + +def deco(func, *args): + return func + +@deco # <= Here is a false positive. +def myfunc(a, b): + print(a, b)
\ No newline at end of file diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/contextManagerSubclass.py b/python/testData/inspections/PyUnresolvedReferencesInspection/contextManagerSubclass.py new file mode 100644 index 000000000000..f7406dedbb6f --- /dev/null +++ b/python/testData/inspections/PyUnresolvedReferencesInspection/contextManagerSubclass.py @@ -0,0 +1,12 @@ +class C(object): + def __enter__(self): + return self + + +class D(C): + def foo(self): + pass + + +with D() as cm: + cm.foo() # pass diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/ivarInDocstring.py b/python/testData/inspections/PyUnresolvedReferencesInspection/ivarInDocstring.py new file mode 100644 index 000000000000..1fec85f8b63b --- /dev/null +++ b/python/testData/inspections/PyUnresolvedReferencesInspection/ivarInDocstring.py @@ -0,0 +1,10 @@ + +class SomeClass(object): + """ Awesome class + + @ivar someVar: great stuff + @type someVar: string + """ + + def __init__(self): + self.someVar = None
\ No newline at end of file diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/returnSelfInSuperClass.py b/python/testData/inspections/PyUnresolvedReferencesInspection/returnSelfInSuperClass.py new file mode 100644 index 000000000000..79c56a020033 --- /dev/null +++ b/python/testData/inspections/PyUnresolvedReferencesInspection/returnSelfInSuperClass.py @@ -0,0 +1,13 @@ +class C(object): + def get_self(self): + return self + + +class D(C): + def foo(self): + pass + + +d = D() +print(d.foo()) +print(d.get_self().foo()) # pass diff --git a/python/testData/inspections/PyUnusedLocalVariableInspection/test.py b/python/testData/inspections/PyUnusedLocalVariableInspection/test.py index 5edffda057d2..65913e27c745 100644 --- a/python/testData/inspections/PyUnusedLocalVariableInspection/test.py +++ b/python/testData/inspections/PyUnusedLocalVariableInspection/test.py @@ -303,3 +303,16 @@ def test_unused_condition_local_with_last_if_in_cycle(c): x = False #pass if c: x = True + + +# PY-7527 +def test_unused_empty_init_parameter(): + class C(object): + def __init__(self, <weak_warning descr="Parameter 'foo' value is not used">foo</weak_warning>): + pass + + def f(self, bar): + pass + + return C + diff --git a/python/testData/inspections/ReplaceNotEqOperator.py b/python/testData/inspections/ReplaceNotEqOperator.py index c0c6300b8e1f..790a765f19ca 100644 --- a/python/testData/inspections/ReplaceNotEqOperator.py +++ b/python/testData/inspections/ReplaceNotEqOperator.py @@ -1 +1 @@ -print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support <>, use != instead.">a <> b</warning>)
\ No newline at end of file +print(<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4 do not support <>, use != instead.">a<caret> <> b</warning>)
\ No newline at end of file diff --git a/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromInstance_after.py b/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromInstance_after.py index 686290338cf5..7027a3993765 100644 --- a/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromInstance_after.py +++ b/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromInstance_after.py @@ -1,8 +1,7 @@ class A: def __init__(self): - self.x = 1 self.y = None - + self.x = 1 a = A() a.y+1 diff --git a/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromMethod_after.py b/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromMethod_after.py index 3ac2f7ecd201..c0ce40fe9e03 100644 --- a/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromMethod_after.py +++ b/python/testData/quickFixes/AddFieldQuickFixTest/addFieldFromMethod_after.py @@ -1,7 +1,7 @@ class A: def __init__(self): - self.x = 1 self.y = None + self.x = 1 def foo(self): a = self.y diff --git a/python/testData/inspections/FieldFromUnusedParameter.py b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameter.py index a9b802bb0136..a9b802bb0136 100644 --- a/python/testData/inspections/FieldFromUnusedParameter.py +++ b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameter.py diff --git a/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameterKeyword.py b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameterKeyword.py new file mode 100644 index 000000000000..27f1600fe718 --- /dev/null +++ b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameterKeyword.py @@ -0,0 +1,3 @@ +class A: + def __init__(self, fo<caret>o=True): + print('hello')
\ No newline at end of file diff --git a/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameterKeyword_after.py b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameterKeyword_after.py new file mode 100644 index 000000000000..3f86fa418459 --- /dev/null +++ b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameterKeyword_after.py @@ -0,0 +1,4 @@ +class A: + def __init__(self, foo=True): + self.foo = foo + print('hello')
\ No newline at end of file diff --git a/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameter_after.py b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameter_after.py new file mode 100644 index 000000000000..58785edcedea --- /dev/null +++ b/python/testData/quickFixes/AddFieldQuickFixTest/fromUnusedParameter_after.py @@ -0,0 +1,4 @@ +class A: + def __init__(self, foo): + self.foo = foo + print('hello')
\ No newline at end of file diff --git a/python/testData/quickFixes/AddMethodQuickFixTest/addMethodFromMethod_after.py b/python/testData/quickFixes/AddMethodQuickFixTest/addMethodFromMethod_after.py index 978acaf15275..5c47b58a48dc 100644 --- a/python/testData/quickFixes/AddMethodQuickFixTest/addMethodFromMethod_after.py +++ b/python/testData/quickFixes/AddMethodQuickFixTest/addMethodFromMethod_after.py @@ -8,6 +8,7 @@ class A: def y(self, param, a): pass + # Some comment class B: diff --git a/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/addPass_after.py b/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/addPass_after.py index da65a030ea4d..040de7386118 100644 --- a/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/addPass_after.py +++ b/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/addPass_after.py @@ -3,8 +3,8 @@ __author__ = 'ktisha' class A: def __init__(self): - self._a = 1 self.b = 1 + self._a = 1 def foo(self): pass diff --git a/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/moveToInit_after.py b/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/moveToInit_after.py index 2dc80743d949..9a83f676bfdc 100644 --- a/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/moveToInit_after.py +++ b/python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/moveToInit_after.py @@ -3,8 +3,8 @@ __author__ = 'ktisha' class A: def __init__(self): - self._a = 1 self.b = 1 + self._a = 1 def foo(self): c = 1
\ No newline at end of file diff --git a/python/testData/refactoring/introduceField/py4437.after.py b/python/testData/refactoring/introduceField/py4437.after.py index e9c7d7535699..07a1331b604a 100644 --- a/python/testData/refactoring/introduceField/py4437.after.py +++ b/python/testData/refactoring/introduceField/py4437.after.py @@ -1,7 +1,7 @@ class SomeClass(): def __init__(self): - self.x = 1 self.a = '' + self.x = 1 def foo(self): self.a |