You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For below code mypy will show the issue
error: Item "Duration" of "Union[Date, Time, DateTime, Duration]" has no attribute "format"
While you can see format is working fine and returning the desired results.
Darwin 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64 i386
Issue
So, mypy thinks
pendulum.parse
returns a string, when in fact it returns a duration (in this case). Thestr
return type was just added toparse
: https://github.com/sdispater/pendulum/pull/320/files#diff-d79c6f58aeecd540ddd61603df9184aaR17.I think the right type would be a
Union
ofpendulum.duration.Duration
and other types.The text was updated successfully, but these errors were encountered: