-
Notifications
You must be signed in to change notification settings - Fork 125
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
project: Fix and check pyupgrade issues #763
Conversation
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.
The cleanup commit is a bit too big for my taste hence a bit painful to check... could you split it in say 2 or 3? Maybe one commit with all the type changes and another commit for the rest...
tests/conftest.py
Outdated
os.path.join(_session_repos, x) for x in | ||
['Kconfiglib', 'tagged_repo', 'net-tools', 'zephyr']] | ||
['Kconfiglib', 'tagged_repo', 'net-tools', 'zephyr']) |
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 curious what was the warning here...
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.
It was actually a deprecated rule itself, which was still "automagically" fixed with ruff check --fix
.
I've ignored this rule.
Derived from pyupgrade, see https://docs.astral.sh/ruff/rules/redundant-open-modes/ Signed-off-by: Pieter De Gendt <[email protected]>
Derived from pyupgrade, see https://docs.astral.sh/ruff/rules/non-pep585-annotation/ Signed-off-by: Pieter De Gendt <[email protected]>
Derived from pyupgrade, see https://docs.astral.sh/ruff/rules/non-pep585-annotation/ Signed-off-by: Pieter De Gendt <[email protected]>
Derived from pyupgrade, see https://docs.astral.sh/ruff/rules/non-pep585-annotation/ Signed-off-by: Pieter De Gendt <[email protected]>
Derived from pyupgrade, see https://docs.astral.sh/ruff/rules/non-pep585-annotation/ Signed-off-by: Pieter De Gendt <[email protected]>
Derived from pyupgrade, see https://docs.astral.sh/ruff/rules/super-call-with-parameters/ Signed-off-by: Pieter De Gendt <[email protected]>
Derived from pyupgrade, see https://docs.astral.sh/ruff/rules/quoted-annotation/ Signed-off-by: Pieter De Gendt <[email protected]>
Derived from pyupgrade, see https://docs.astral.sh/ruff/rules/deprecated-import/ Signed-off-by: Pieter De Gendt <[email protected]>
Derived from pyupgrade, see https://docs.astral.sh/ruff/rules/unicode-kind-prefix/ Signed-off-by: Pieter De Gendt <[email protected]>
Derived from pyupgrade, see https://docs.astral.sh/ruff/rules/f-string/ Signed-off-by: Pieter De Gendt <[email protected]>
Check for deprecated usages in the project when running ruff check. Signed-off-by: Pieter De Gendt <[email protected]>
db0741c
to
39c0493
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.
LGTM, thanks!
Depending on the minimum supported python version (3.9 in our case),
pyupgrade
will report deprecated python features.Extend
ruff
withpyupgrade
checks.Depends on #762