-
-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autocomplete inherited methods when overriding in child class. Fixes #…
…458.
- Loading branch information
1 parent
62e1841
commit 647a4db
Showing
4 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# todo probably remove test_integration_keyword | ||
|
||
def test_keyword_doc(): | ||
r = list(Script("or", 1, 1).goto_definitions()) | ||
assert len(r) == 1 | ||
assert len(r[0].doc) > 100 | ||
|
||
r = list(Script("asfdasfd", 1, 1).goto_definitions()) | ||
assert len(r) == 0 | ||
|
||
k = Script("fro").completions()[0] | ||
imp_start = '\nThe ``import' | ||
assert k.raw_doc.startswith(imp_start) | ||
assert k.doc.startswith(imp_start) | ||
|
||
|
||
def test_blablabla(): | ||
defs = Script("import").goto_definitions() | ||
assert len(defs) == 1 and [1 for d in defs if d.doc] | ||
# unrelated to #44 | ||
|
||
|
||
def test_operator_doc(self): | ||
r = list(Script("a == b", 1, 3).goto_definitions()) | ||
assert len(r) == 1 | ||
assert len(r[0].doc) > 100 | ||
|
||
def test_lambda(): | ||
defs = Script('lambda x: x', column=0).goto_definitions() | ||
assert [d.type for d in defs] == ['keyword'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
class X(): | ||
def func(self, foo): | ||
pass | ||
|
||
|
||
class Y(X): | ||
def actual_function(self): | ||
pass | ||
|
||
#? [] | ||
def actual_function | ||
#? ['func'] | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
PeterJCLaw
Collaborator
|
||
def f | ||
|
||
#? [] | ||
def __class__ | ||
|
||
#? ['__repr__'] | ||
def __repr__ | ||
|
||
#? [] | ||
def mro |
Should provide 'func(self, foo)' as one completion option. Ideally, an extra line with
super().func(foo)
should be added below.