This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* setup: Set the minimum mypy version to 0.930 * fix: New typecheck errors due to stricter enum validation * fix: Workaround limitation of type variable usage in ClassVar We just fallback to `typing.Any` and make an explicit type-cast, instead of resolving the generic type argument at runtime to automatically get the reference to `uuid_subtype_func`. Here is the story: Currently Python does not allow introspection of generic type arguments in runtime. For some limited cases, we could refer `__orig_bases__`, but somehow it does not work for us and it is a known limitation that we cann t resolve it early in the object lifecycle. (ref: https://stackoverflow.com/questions/57706180, python/typing#658) Moreover, SQLAlchemy's `TypeDecorator` also involves its own metaclass logic from `TraversibleType`, which makes `__orig_class__` unavailable.
- Loading branch information
Showing
6 changed files
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Update mypy to 0.930 and fix newly discovered type errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters