-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
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
Bump ruff to 0.9.0 #135197
base: dev
Are you sure you want to change the base?
Bump ruff to 0.9.0 #135197
Conversation
f"{self._device._setpoint_shift.group_address}" # noqa: SLF001 | ||
) |
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.
Looks like a bug in ruff, because the noqa got moved
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 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.
You are faster than me this time 😛 Hmm, with that we will need to wait until 0.9.1, I think 🤔
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 mean, it was a breaking change and it looked like something would change and that sounds interesting :P
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.
Yeah, you probably want to wait for 0.9.1. The only alternative is disabling formatting for this statement, which seems undesirable. I hope to get a release out later today, depending on if astral-sh/ruff#15378 gets accepted.
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 mean there is not that big of a rush now, all the other formatting changes are already being handled in separate PRs, so in the end this PR will be small
@@ -815,8 +814,8 @@ def _exception_message( | |||
call_back_name = getattr(msg_callback, "__name__") | |||
return ( | |||
f"Exception in {call_back_name} when handling msg on " | |||
f"'{msg.topic}': '{msg.payload}'" # type: ignore[str-bytes-safe] | |||
) | |||
f"'{msg.topic}': '{msg.payload}'" |
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.
@jbouwh Can you confirm what the desired behaviour is here what mypy is complaining about?
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.
Oh never mind, ruff moved the type ignore to the next line
Please add a link to Ruff's changelog |
I thought you would have enjoyed reading a ton of Rust code :P Added |
You should also bump the ruff version in |
I did right? |
Sorry, GitHub web UI is horrible 🙈 |
pyproject.toml
Outdated
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.
You can now re-enable ISC001. It no longer conflicts with the formatter
Line 842 in b5971ec
"ISC001", |
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.
In 0.9.0? Or already before that?
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's no longer conflicting as of Ruff 0.9 (we changed the formatter style to make it compatible)
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.
Ah check! I will probably do that in a followup then
Proposed change
Bump ruff to 0.9.0
astral-sh/ruff@0.8.6...0.9.0
https://github.com/astral-sh/ruff/releases/tag/0.9.0
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: