Skip to content

Commit

Permalink
Bump ruff from 0.5.5 to 0.7.2 (#734)
Browse files Browse the repository at this point in the history
* Bump ruff from 0.5.5 to 0.7.2

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.5 to 0.7.2.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.5.5...0.7.2)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Disable ASYNC109 in tests

* Adjust for ICN001 in voice.py

* Ignore ASYNC110 on line 294 in remote.py

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ludeeus <[email protected]>
  • Loading branch information
dependabot[bot] and ludeeus authored Nov 5, 2024
1 parent 85f6e71 commit cbb3259
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion hass_nabucasa/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ async def load_backend(self) -> bool:
_LOGGER.debug("Waiting for aiohttp runner to come available")

# aiohttp_runner comes available when Home Assistant has started.
while self.cloud.client.aiohttp_runner is None:
while self.cloud.client.aiohttp_runner is None: # noqa: ASYNC110
await asyncio.sleep(1)

try:
Expand Down
8 changes: 4 additions & 4 deletions hass_nabucasa/voice.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from enum import Enum
import logging
from typing import TYPE_CHECKING
from xml.etree import ElementTree
from xml.etree import ElementTree as ET

from aiohttp.hdrs import ACCEPT, AUTHORIZATION, CONTENT_TYPE, USER_AGENT
import attr
Expand Down Expand Up @@ -1323,9 +1323,9 @@ async def process_tts(
await self._update_token()

# SSML
xml_body = ElementTree.Element("speak", version="1.0")
xml_body = ET.Element("speak", version="1.0")
xml_body.set("{http://www.w3.org/XML/1998/namespace}lang", language)
voice_el = ElementTree.SubElement(xml_body, "voice")
voice_el = ET.SubElement(xml_body, "voice")
voice_el.set("{http://www.w3.org/XML/1998/namespace}lang", language)
voice_el.set(
"name",
Expand All @@ -1350,7 +1350,7 @@ async def process_tts(
"X-Microsoft-OutputFormat": output_header,
USER_AGENT: self.cloud.client.client_name,
},
data=ElementTree.tostring(xml_body),
data=ET.tostring(xml_body),
) as resp:
if resp.status == 429 and not force_token_renewal:
# By checking the force_token_renewal argument, we limit retries to 1.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test = [
"pytest-aiohttp==1.0.5",
"pytest-timeout==2.3.1",
"pytest==8.3.3",
"ruff==0.5.5",
"ruff==0.7.2",
"types_atomicwrites==1.4.5.1",
"types_pyOpenSSL==24.1.0.20240722",
"xmltodict==0.14.2",
Expand Down
1 change: 1 addition & 0 deletions tests/ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ignore = [
"ANN003",
"ANN201",
"ANN202",
"ASYNC109",
"ASYNC230",
"PT004",
"PT006",
Expand Down

0 comments on commit cbb3259

Please sign in to comment.