Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle hover for property-decorated methods #204

Merged
merged 2 commits into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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