Skip to content

Commit

Permalink
Editor: Fix not showing hovers for objects without docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Nov 2, 2022
1 parent 784f668 commit 90e4f8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import sys

# Third party imports
from qtpy import PYQT_VERSION
from qtpy.QtCore import Qt, QPoint
from qtpy.QtGui import QTextCursor
import pytest
Expand Down
4 changes: 3 additions & 1 deletion spyder/widgets/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def _check_signature_and_format(self, signature_or_text, parameter=None,
language = getattr(self, 'language', language).lower()
signature_or_text = signature_or_text.replace('\\*', '*')

# Remove special symbols that could itefere with ''.format
# Remove special symbols that could interfere with ''.format
signature_or_text = signature_or_text.replace('{', '{')
signature_or_text = signature_or_text.replace('}', '}')

Expand Down Expand Up @@ -521,6 +521,8 @@ def _check_signature_and_format(self, signature_or_text, parameter=None,
else:
signature = '\n'.join(lines[:i])
extra_text = '\n'.join(lines[i:])
if extra_text == '\n':
extra_text = None

if signature:
new_signature = self._format_signature(
Expand Down

0 comments on commit 90e4f8d

Please sign in to comment.