Skip to content

Commit 7e73998

Browse files
authored
Don't show signature for modules in hovers (#323)
1 parent 89375e0 commit 7e73998

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pylsp/plugins/hover.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@ def pylsp_hover(config, document, position):
3131
preferred_markup_kind = _utils.choose_markup_kind(supported_markup_kinds)
3232

3333
# Find first exact matching signature
34-
signature = next((x.to_string() for x in definition.get_signatures()
35-
if x.name == word), '')
34+
signature = next(
35+
(
36+
x.to_string() for x in definition.get_signatures()
37+
if (x.name == word and x.type not in ["module"])
38+
),
39+
''
40+
)
3641

3742
return {
3843
'contents': _utils.format_docstring(

0 commit comments

Comments
 (0)