Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to using the sqlalchemy mypy plugin #126

Draft
wants to merge 4 commits into
base: more-types
Choose a base branch
from

Conversation

PeterJCLaw
Copy link
Contributor

This provides better type checking against the sqlalchemy code and allows us to remove our stubs and the type: ignores which were in various places where the stubs didn't match reality.

Included here for now are some related refactors which this highlighted, though they should probably be hoisted to separate PRs.

It turns out that this was working due to a fluke in the way that
process_gate works; specifically that it actually ignores the
passed in state_machine value and fetches the one for the label.
It's been passed in; we can just use that.
This allows us to set the right return type for the underlying
database util and makes handling of unknown labels in process_gate
and process_action explicit (though admitedly in those cases it
shouldn't ever happen).
This provides better type checking against the sqlalchemy code
and allows us to remove our stubs and the 'type: ignore's which
were in various places where the stubs didn't match reality.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0003%) to 99.346% when pulling 8a5f8f9 on use-sqlalchemy-mypy-plugin into 7048fea on more-types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants