1
0
forked from VimPlug/jedi

Remove a lot of sys.version_info references

This commit is contained in:
Dave Halter
2020-07-02 02:45:35 +02:00
parent cfd8eb23b8
commit f4e537fd72
18 changed files with 22 additions and 98 deletions

View File

@@ -152,12 +152,11 @@ def _load_module(inference_state, path):
def _get_object_to_check(python_object):
"""Check if inspect.getfile has a chance to find the source."""
if sys.version_info[0] > 2:
try:
python_object = inspect.unwrap(python_object)
except ValueError:
# Can return a ValueError when it wraps around
pass
try:
python_object = inspect.unwrap(python_object)
except ValueError:
# Can return a ValueError when it wraps around
pass
if (inspect.ismodule(python_object)
or inspect.isclass(python_object)