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
powerfactory_utils/schema/base.py:3:1: TC003 Move built-in import 'datetime' into a type-checking block
powerfactory_utils/schema/base.py:4:1: TC003 Move built-in import 'pathlib' into a type-checking block
powerfactory_utils/schema/base.py:5:1: TC003 Move built-in import 'uuid' into a type-checking block
Sorry @sasanjac, I totally missed this. Yeah we have to manually map each part of a type annotation, so there's likely some missing handling here. I won't be able to look at this in the short-term, but a PR is very welcome 🙂 If not, I'll get to it eventually!
I noticed some really strange behavior. Given the following example:
doesn't report any violations, although I should get
because
type-checking-pydantic-enabled
isfalse
.When I do the following changes
I get
so everything is working correctly.
When I import
uuid4
directly and changeI also get the violations.
I think it has to do with using imports with their module prefix that keeps these violations from getting detected.
Can anyone reproduce this?
The text was updated successfully, but these errors were encountered: