properties with setters are now reported as 'property' for completion (#1983)

* properties with setters are now reported as 'property' for completion

* code cleanups

* fixed test

* fixed tests

* Revert "fixed test"

This reverts commit a80c955a48.

* code quality cleanup

* so picky

* Revert "Revert "fixed test""

This reverts commit 58dfc5292e.

* updated test per maintainer comments #1983

* removed extra char
This commit is contained in:
Ehsan Iran-Nejad
2024-02-19 06:07:47 -06:00
committed by GitHub
parent 740b474eda
commit 54a6dadde3
3 changed files with 13 additions and 11 deletions

View File

@@ -348,8 +348,8 @@ def test_parent_on_comprehension(Script):
def test_type(Script):
for c in Script('a = [str()]; a[0].').complete():
if c.name == '__class__' and False: # TODO fix.
assert c.type == 'class'
if c.name == '__class__':
assert c.type == 'property'
else:
assert c.type in ('function', 'statement')