general: fix mypy errors after mypy and pytz stubs updates
see 968fd6d01d/stubs/pytz/pytz/tzinfo.pyi (L6)
it says all concrete instances should not be None
This commit is contained in:
parent
9578b13fca
commit
dd928964e6
4 changed files with 6 additions and 5 deletions
|
@ -572,7 +572,7 @@ def test_guess_datetime() -> None:
|
|||
def is_namedtuple(thing: Any) -> bool:
|
||||
# basic check to see if this is namedtuple-like
|
||||
_asdict = getattr(thing, '_asdict', None)
|
||||
return _asdict and callable(_asdict)
|
||||
return (_asdict is not None) and callable(_asdict)
|
||||
|
||||
|
||||
def asdict(thing: Any) -> Json:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue