Skip to content

Commit

Permalink
Merge pull request #204 from pappasam/fix-property-hover
Browse files Browse the repository at this point in the history
Handle hover for property-decorated methods
  • Loading branch information
pappasam authored Apr 28, 2022
2 parents 410725b + 5ef3f91 commit 62a3d8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

### Changed
### Removed

- Drop support for Python 3.6

### Fixed

- Class properties now hover as simple properties. Resolves <https://github.com/pappasam/jedi-language-server/issues/200>

## 0.35.1

### Changed
Expand Down
5 changes: 3 additions & 2 deletions jedi_language_server/jedi_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,10 +513,11 @@ def get_full_signatures(name: BaseName) -> Iterator[str]:
signatures = name.get_signatures()
name_type = name.type
if not signatures:
if name_type not in _SIGNATURE_TYPES:
if name_type == "property":
yield f"{_SIGNATURE_TYPE_TRANSLATION[name_type]} {name.name}"
elif name_type not in _SIGNATURE_TYPES:
yield name.description
else:
name_type_trans = _SIGNATURE_TYPE_TRANSLATION[name_type]
yield f"{_SIGNATURE_TYPE_TRANSLATION[name_type]} {name.name}()"
return
name_type_trans = _SIGNATURE_TYPE_TRANSLATION[name_type]
Expand Down

0 comments on commit 62a3d8b

Please sign in to comment.