-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Get /models
passing mypy checks.
#15062
Conversation
3c6c1b4
to
28046dc
Compare
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.
I am such a big fan of this effort 🙇
async def read_configuration_value(self, session: sa.orm.Session, key: str): | ||
async def read_configuration_value(self, session: AsyncSession, key: str): |
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.
We could probably just do a full-blown s/sa.orm.Session/AsyncSession/g
through the whole repo because there's nowhere that we're actually using a sync session to me knowledge. I guess the imports will also need to be fixed up too, but I wonder how pervasive it is now
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.
There's only 10 left now, I can replace those in a follow-up PR.
CodSpeed Performance ReportMerging #15062 will not alter performanceComparing Summary
|
28046dc
to
b80a490
Compare
@@ -86,7 +86,7 @@ class or a Block interface class | |||
""" | |||
|
|||
|
|||
def _collect_nested_reference_strings(obj: Dict): | |||
def _collect_nested_reference_strings(obj: Dict) -> List[str]: |
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.
I'm surprised mypy lets a naked generic like Dict though, is there a mypy setting that's letting this fly?
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.
I believe mypy
just treats it as Dict[Any, Any]
, no particularly special config, though I am technically using a config different than what's in the repo to get stricter validation that we can't do codebase-wide yet:
[mypy]
plugins =
pydantic.mypy
ignore_missing_imports = True
follow_imports = normal
disallow_untyped_defs = True
This pull request is stale because it has been open 14 days with no activity. To keep this pull request open remove stale label or comment. |
23af86a
to
7fce72e
Compare
7fce72e
to
5328344
Compare
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.
🌟 🌟 🌟 🌟 🌟
flow_filter: Optional[schemas.filters.FlowFilter] = None, | ||
flow_run_filter: Optional[schemas.filters.FlowRunFilter] = None, | ||
task_run_filter: Optional[schemas.filters.TaskRunFilter] = None, | ||
deployment_filter: Optional[schemas.filters.DeploymentFilter] = None, | ||
work_pool_filter: Optional[schemas.filters.WorkPoolFilter] = None, | ||
work_queue_filter: Optional[schemas.filters.WorkQueueFilter] = None, |
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.
🙌
This gets all of the files in
/models
to pass mypy checks.