Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#114)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- https://github.com/charliermarsh/ruff-pre-commithttps://github.com/astral-sh/ruff-pre-commit
- [github.com/astral-sh/ruff-pre-commit: v0.0.270 → v0.0.276](astral-sh/ruff-pre-commit@v0.0.270...v0.0.276)
- [github.com/pre-commit/mirrors-mypy: v1.3.0 → v1.4.1](pre-commit/mirrors-mypy@v1.3.0...v1.4.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix pre-commit problems

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bas Nijholt <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and basnijholt authored Jul 4, 2023
1 parent 57b0b5f commit d8e2f7a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ repos:
hooks:
- id: black-jupyter
language_version: python3
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.270"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.276"
hooks:
- id: ruff
args: ["--fix"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.3.0"
rev: "v1.4.1"
hooks:
- id: mypy
additional_dependencies: ["types-PyYAML", "types-requests", "types-setuptools"]
5 changes: 2 additions & 3 deletions home_assistant_streamdeck_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ async def setup_ws(
console.log(auth_response)
console.log("Connected to Home Assistant")
yield websocket
except ConnectionResetError:
except ConnectionResetError: # noqa: PERF203
# Connection was reset, retrying in 3 seconds
console.print_exception(show_locals=True)
console.log("Connection was reset, retrying in 3 seconds")
Expand Down Expand Up @@ -1697,8 +1697,7 @@ def _download_image(
image = image.convert("RGB")
if filename is not None:
image.save(filename)
image = image.resize(size)
return image
return image.resize(size)


def update_all_key_images(
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ ignore = [
"PLR0913", # Too many arguments to function call (N > 5)
"TD002", # Missing author in TODO; try: `# TODO(<author_name>): ...`
"TD003", # Missing issue link on the line following this TODO
"FIX002", # Line contains TODO
]

[tool.ruff.per-file-ignores]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ def test_buttons(buttons: list[Button], state: dict[str, dict[str, Any]]) -> Non
page = Page(name="Home", buttons=buttons)
config = Config(pages=[page])
first_page = config.to_page(0)
rendered_buttons = []
for button in first_page.buttons:
rendered_buttons.append(button.rendered_template_button(state))
rendered_buttons = [
button.rendered_template_button(state) for button in first_page.buttons
]

b = rendered_buttons[0] # LIGHT
assert b.domain == "light"
Expand Down

0 comments on commit d8e2f7a

Please sign in to comment.