Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use empty string instead of None for fallback. Fixes #2313.
diff --git a/spyderlib/utils/introspection/plugin_manager.py b/spyderlib/utils/introspection/plugin_manager.py index 9685848..0db27dd 100644 --- a/spyderlib/utils/introspection/plugin_manager.py +++ b/spyderlib/utils/introspection/plugin_manager.py @@ -158,7 +158,7 @@ class CodeInfo(object): break position -= 1 else: - self.docstring = None + self.docstring = '' self.position = position @@ -167,8 +167,8 @@ class CodeInfo(object): self.column = 0 self.line_num = 0 self.line = '' - self.obj = None - self.full_obj = None + self.obj = '' + self.full_obj = '' else: self._get_info() @@ -229,6 +229,7 @@ class CodeInfo(object): right += 1 if left and right < len(self.source_code): return self.source_code[left: right] + return '' def __eq__(self, other): try:
- Loading branch information