-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Add ruff B005, B015, B032 and fix occurrences #113543
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.
LGTM,
Thnx @autinerd 👍
@abstractmethod | ||
async def async_reload(self, language: str | None = None) -> None: | ||
"""Clear cached intents for a language.""" | ||
|
||
@abstractmethod | ||
async def async_prepare(self, language: str | None = None) -> None: | ||
"""Load intents for a language.""" |
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.
Okay, these two functions are only implemented by DefaultAgent, but no other of the Agent classes. I will revert this rule for now because fixing this would need more work.
Oh, quite some tests are failing because of the "new" asserts. Will have to look into them. |
I'll have a look at the mqtt siren test issues |
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
You need to fix the merge conflict |
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Hmm, I don't know why this test fails, on my machine the |
I had the same. I'll have a closer look. |
I expect the Maybe try 0.2 |
|
Yeah thats a much better fix 👍 |
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,
Thnx @autinerd 👍
Proposed change
This adds the following Ruff rules and fixes the occurrences in the codebase:
.strip()
with multi-character strings is misleadingassert
or remove it.Quite some tests had comparisons without
assert
, which are pointless.B027: {name} is an empty method in an abstract base class, but has no abstract decoratorType 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
..coveragerc
.To help with the load of incoming pull requests: