Skip to content
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 from 0.5.5 to 0.7.2 #734

Merged
merged 4 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, adjusting this should be a separate PR, so it's disabled for now.

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