1
0
forked from VimPlug/jedi

Remove a lot more Python 2 mentions and todos

This commit is contained in:
Dave Halter
2020-07-02 10:30:58 +02:00
parent a51f667be8
commit 7f67324210
9 changed files with 15 additions and 37 deletions
+1 -1
View File
@@ -272,7 +272,7 @@ def _load_from_typeshed(inference_state, python_value_set, parent_module_value,
def _try_to_load_stub_from_file(inference_state, python_value_set, file_io, import_names):
try:
stub_module_node = parse_stub_module(inference_state, file_io)
except (OSError, IOError): # IOError is Python 2 only
except OSError: # IOError is Python 2 only
# The file that you're looking for doesn't exist (anymore).
return None
else:
+2 -4
View File
@@ -88,12 +88,10 @@ class TypingModuleName(NameWrapper):
inference_state, self.parent_context, self.tree_name)
elif name in ('no_type_check', 'no_type_check_decorator'):
# This is not necessary, as long as we are not doing type checking.
for c in self._wrapped_name.infer(): # Fuck my life Python 2
yield c
yield from self._wrapped_name.infer()
else:
# Everything else shouldn't be relevant for type checking.
for c in self._wrapped_name.infer(): # Fuck my life Python 2
yield c
yield from self._wrapped_name.infer()
class TypingModuleFilterWrapper(FilterWrapper):