fix mypy issues after mypy/libraries updates
This commit is contained in:
parent
efa2e53c8a
commit
0ee43b88bf
6 changed files with 9 additions and 9 deletions
|
@ -178,7 +178,7 @@ pass 'drop_exceptions' to ignore exceptions""")
|
|||
return lambda o: o.get(key, default) # type: ignore[union-attr]
|
||||
else:
|
||||
if hasattr(obj, key):
|
||||
return lambda o: getattr(o, key, default) # type: ignore[arg-type]
|
||||
return lambda o: getattr(o, key, default)
|
||||
|
||||
# Note: if the attribute you're ordering by is an Optional type,
|
||||
# and on some objects it'll return None, the getattr(o, field_name, default) won't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue