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

DM-48977: Switch to new Python type variable syntax #410

Merged
merged 1 commit into from
Feb 17, 2025
Merged

Conversation

rra
Copy link
Member

@rra rra commented Feb 17, 2025

Switch to the new Python syntax for generic parameters to classes and functions. This apparently unconfused mypy and Ruff enough that it uncovered some additional diagnostics, which required some noqa comments and some code refactoring, one to fix a bug and another to unconfuse the type checker.

Switch to the new Python syntax for generic parameters to classes
and functions. This apparently unconfused mypy and Ruff enough that
it uncovered some additional diagnostics, which required some `noqa`
comments and some code refactoring, one to fix a bug and another to
unconfuse the type checker.
@rra rra enabled auto-merge February 17, 2025 23:03
@rra rra merged commit 25daa2f into main Feb 17, 2025
4 checks passed
@rra rra deleted the tickets/DM-48977 branch February 17, 2025 23:05
@@ -114,21 +111,21 @@ def __init__(

# Methods that should be overridden by child classes if needed.

async def startup(self) -> None:
async def startup(self) -> None: # noqa: B027
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about return None for these instead of disabling linting? That is, if that gets rid of the warning which I don't actually know if it does...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, good call, I will try that and see if that suppresses the Ruff warning.

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

Successfully merging this pull request may close these issues.

2 participants