-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Labels
refactorImproves code itself, but does not fix a bug or add new functionality.Improves code itself, but does not fix a bug or add new functionality.
Description
PR #1100 updated our type annotations to the modern syntax and types. We should have a CI rule to enforce no regressions. From @NicolasHug:
I think we'll want a linter rule now, to enforce the new style? pyupgrade looks like what we'd want. It comes with pre-commit hooks too, so we can put it on the CI.
I ran it locally on this PR with:
find src -type f | grep ".py$" | xargs pyupgrade --py310-plusand the good news is that your PR is spot-on, the only added changes were:
from typing import Generator # before from collections.abc import Generator # nowThere were a few more minor changes in the test.
Metadata
Metadata
Assignees
Labels
refactorImproves code itself, but does not fix a bug or add new functionality.Improves code itself, but does not fix a bug or add new functionality.