Skip to content

Commit

Permalink
'fix a couple of error locations'
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau authored and davidhalter committed Feb 24, 2017
1 parent 68c6f8d commit fc27ca1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jedi/evaluate/compiled/__init__.py
Expand Up @@ -346,7 +346,7 @@ def values(self):

is_instance = self._is_instance or fake.is_class_instance(obj)
# ``dir`` doesn't include the type names.
if not inspect.ismodule(obj) and obj != type and not is_instance:
if not inspect.ismodule(obj) and (obj is not type) and not is_instance:
for filter in create(self._evaluator, type).get_filters():
names += filter.values()
return names
Expand Down
4 changes: 2 additions & 2 deletions jedi/evaluate/compiled/fake.py
Expand Up @@ -132,7 +132,7 @@ def _faked(module, obj, name):
return None, None
return _search_scope(cls, obj.__name__), faked_mod
else:
if obj == module:
if obj is module:
return _search_scope(faked_mod, name), faked_mod
else:
try:
Expand All @@ -156,7 +156,7 @@ def memoizer(*args, **kwargs):
key = (obj, args, frozenset(kwargs.items()))
try:
result = cache[key]
except TypeError:
except (TypeError, ValueError):
return obj(*args, **kwargs)
except KeyError:
result = obj(*args, **kwargs)
Expand Down

0 comments on commit fc27ca1

Please sign in to comment.