-
Notifications
You must be signed in to change notification settings - Fork 5
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
Enable mypy in pre-commit, and fix issues found by it #100
Conversation
@c-wygoda could you merge this as an administrator? I can't because the removed |
removed |
@@ -16,7 +16,7 @@ class OrderProperties(BaseModel): | |||
class Order(Feature[Geometry, OrderProperties]): | |||
# We need to enforce that orders have an id defined, as that is required to | |||
# retrieve them via the API | |||
id: StrictInt | StrictStr # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# type: ignore
here is required to satisfy certain type checkers (pyright) because this change makes id
incompatible with Feature
(which has id: StrictInt | StrictStr | None
) without a default value.
I replaced the existing custom pre-commit action with a simpler (non-cached) call to run it directly. If we want to do it right, we should be using https://github.com/marketplace/pre-commit-ci, but this will suffice for now.