Skip to content

Commit f865dce

Browse files
committed
appease mypy
1 parent 549b0b3 commit f865dce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

memory_inventory/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,10 @@ def extend_queue(f: Callable[[], Iterable[object]]) -> None:
279279
continue
280280
for k, v in cls_dict_items:
281281
getter = getattr(v, '__get__', None)
282-
if getter is None:
283-
continue
284282
if isinstance(getter, property):
285283
getter = getter.fget
284+
if getter is None:
285+
continue
286286
if not is_native_callable(getter):
287287
# Don't try to access non-native properties. They're too
288288
# slow, unsafe, and unlikely to return preexisting objects
@@ -299,7 +299,7 @@ def extend_queue(f: Callable[[], Iterable[object]]) -> None:
299299
continue
300300
debug(f'calling {v}.__get__({object.__repr__(obj)}) ', end='')
301301
try:
302-
attr = getter(obj, cls)
302+
attr = getter(obj, cls) # type: ignore[call-arg]
303303
except DeprecationWarning:
304304
debug('→ emitted a DeprecationWarning')
305305
attributes_to_skip.add(id(v))

0 commit comments

Comments
 (0)