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 black from 22.12.0 to 24.3.0 #367

Merged
merged 3 commits into from
Jul 17, 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
1 change: 0 additions & 1 deletion aiohomekit/controller/ble/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@


class BleDiscovery(AbstractDiscovery):

"""
A discovered BLE HAP device that is unpaired.
"""
Expand Down
1 change: 0 additions & 1 deletion aiohomekit/controller/coap/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@


class CoAPDiscovery(ZeroconfDiscovery):

"""
A discovered CoAP HAP device that is unpaired.
"""
Expand Down
6 changes: 3 additions & 3 deletions aiohomekit/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def __init__(
self._tasks = AsyncExitStack()

async def _async_register_backend(self, controller: AbstractController) -> None:
self.transports[
controller.transport_type
] = await self._tasks.enter_async_context(controller)
self.transports[controller.transport_type] = (
await self._tasks.enter_async_context(controller)
)

async def async_start(self) -> None:
if IP_TRANSPORT_SUPPORTED or self._async_zeroconf_instance:
Expand Down
1 change: 0 additions & 1 deletion aiohomekit/controller/ip/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@


class IpDiscovery(ZeroconfDiscovery):

"""
A discovered IP HAP device that is unpaired.
"""
Expand Down
1 change: 0 additions & 1 deletion aiohomekit/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ def __init__(self, message: str, response):


class TimeoutError(ConnectionError):

"""Connection timeout."""


Expand Down
1 change: 0 additions & 1 deletion aiohomekit/model/characteristics/characteristic_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@


class CharacteristicsTypes:

"""
All known characteristic types.

Expand Down
3 changes: 0 additions & 3 deletions aiohomekit/model/characteristics/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ class VideoCodecTypeValues(enum.IntEnum):


class ProfileIDValues(enum.IntEnum):

"""
The type of H.264 profile used.

Expand All @@ -196,7 +195,6 @@ class ProfileIDValues(enum.IntEnum):


class ProfileSupportLevelValues(enum.IntEnum):

"""
3-255 are reserved by Apple.
"""
Expand All @@ -220,7 +218,6 @@ class CVOEnabledValues(enum.IntEnum):


class AudioCodecValues(enum.IntEnum):

"""
7-255 reserved for Apple.
"""
Expand Down
4 changes: 0 additions & 4 deletions aiohomekit/model/characteristics/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ class VideoConfigConfiguration(TLVStruct):

@dataclass
class SupportedVideoStreamConfiguration(TLVStruct):

"""
UUID 00000114-0000-1000-8000-0026BB765291
Type public.hap.characteristic.supported-video-stream-configuration
Expand All @@ -128,7 +127,6 @@ class SupportedVideoStreamConfiguration(TLVStruct):

@dataclass
class SupportedAudioStreamConfiguration(TLVStruct):

"""
UUID 00000115-0000-1000-8000-0026BB765291
Type public.hap.characteristic.supported-audio-stream-configuration
Expand All @@ -140,7 +138,6 @@ class SupportedAudioStreamConfiguration(TLVStruct):

@dataclass
class SupportedRTPConfiguration(TLVStruct):

"""
UUID 00000116-0000-1000-8000-0026BB765291
Type public.hap.characteristic.supported-rtp-configuration
Expand All @@ -151,7 +148,6 @@ class SupportedRTPConfiguration(TLVStruct):

@dataclass
class SelectedRTPStreamConfiguration(TLVStruct):

"""
UUID 00000117-0000-1000-8000-0026BB765291
Type public.hap.characteristic.selected-rtp-stream-configuration
Expand Down
1 change: 0 additions & 1 deletion aiohomekit/zeroconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ def _async_description_update(self, description: HomeKitService | None) -> None:


class ZeroconfController(AbstractController):

"""
Base class for HAP protocols that rely on Zeroconf discovery.
"""
Expand Down
46 changes: 29 additions & 17 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ aiohappyeyeballs = ">=2.3.0"
[tool.poetry.dev-dependencies]
isort = "^5.10.1"
mypy = "^0.931"
black = "^22.1.0"
black = "^24.3.0"
flake8 = "^4.0.1"
pytest = "^7.2.0"
coverage = "^6.3"
Expand Down
16 changes: 8 additions & 8 deletions tests/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ async def test_passing_in_bleak_to_controller():

Passing in the instance should enable BLE scanning.
"""
with patch.object(
controller_module, "BLE_TRANSPORT_SUPPORTED", False
), patch.object(controller_module, "COAP_TRANSPORT_SUPPORTED", False), patch.object(
controller_module, "IP_TRANSPORT_SUPPORTED", False
with (
patch.object(controller_module, "BLE_TRANSPORT_SUPPORTED", False),
patch.object(controller_module, "COAP_TRANSPORT_SUPPORTED", False),
patch.object(controller_module, "IP_TRANSPORT_SUPPORTED", False),
):
controller = Controller(
bleak_scanner_instance=AsyncMock(register_detection_callback=MagicMock())
Expand All @@ -47,10 +47,10 @@ async def test_passing_in_async_zeroconf(mock_asynczeroconf):

Passing in the instance should enable zeroconf scanning.
"""
with patch.object(
controller_module, "BLE_TRANSPORT_SUPPORTED", False
), patch.object(controller_module, "COAP_TRANSPORT_SUPPORTED", False), patch.object(
controller_module, "IP_TRANSPORT_SUPPORTED", False
with (
patch.object(controller_module, "BLE_TRANSPORT_SUPPORTED", False),
patch.object(controller_module, "COAP_TRANSPORT_SUPPORTED", False),
patch.object(controller_module, "IP_TRANSPORT_SUPPORTED", False),
):
controller = Controller(async_zeroconf_instance=mock_asynczeroconf)
await controller.async_start()
Expand Down
Loading