Repository navigation
fix Infer SQLAlchemy mapped_column type #1600 - #5451
Open
asukaminato0721 wants to merge 2 commits into
Open
asukaminato0721 wants to merge 2 commits into
asukaminato0721 wants to merge 2 commits into
Conversation
Recognize mapped_column calls and refine MappedColumn value types from SQLAlchemy type engines. Preserve descriptor identity, apply generic substitutions, infer enum classes, and respect explicit nullability.
Contributor
|
This pull request has been imported. If you are a Meta employee, you can view this in D128344019. (Because this pull request was imported automatically, there will not be any future comments.) |
|
Diff from mypy_primer, showing the effect of this PR on open source code: ============================================================
SUMMARY
============================================================
Total: +1 new errors, -5 fixed errors
By preset: +0/-0 (default), +0/-0 (strict)
Projects with changes (1):
freqtrade: +1 -5
============================================================
FULL DIFF DETAILS
------------------------------------------------------------
freqtrade (https://github.com/freqtrade/freqtrade)
- ERROR freqtrade/persistence/custom_data.py:58:35-37: The type of attribute `id` is an explicit `Any` [explicit-any-use]
- ERROR freqtrade/persistence/custom_data.py:59:55-66: The type of attribute `ft_trade_id` is an explicit `Any` [explicit-any-use]
- ERROR freqtrade/persistence/custom_data.py:127:32-43: The type of attribute `ft_trade_id` is an explicit `Any` [explicit-any-use]
- ERROR freqtrade/persistence/custom_data.py:148:32-43: The type of attribute `ft_trade_id` is an explicit `Any` [explicit-any-use]
- ERROR freqtrade/persistence/db_migration.py:64:26-81: The type of `max_custom_data_id` is an explicit `Any` [explicit-any-use]
+ ERROR freqtrade/persistence/db_migration.py:73:25-43: Implicit conversion of `int | None` to `bool` is not allowed [implicit-bool] |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1600
continue #1908
Test Plan
add test