Skip to content

Commit a456acf

Browse files
sfo2001claude
andcommitted
fix: address black formatting and pylint c-extension warnings
- Add netifaces to pylint extension-pkg-allow-list to suppress expected C extension warnings - Apply black formatting fixes to discovery.py (quote style consistency) All quality checks now pass with 10.00/10 pylint score. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 79f3771 commit a456acf

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

aiocomfoconnect/discovery.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ def connection_made(self, transport: asyncio.transports.DatagramTransport):
3838
# Determine broadcast address programmatically
3939
try:
4040
gws = netifaces.gateways()
41-
default_iface = gws['default'][netifaces.AF_INET][1]
41+
default_iface = gws["default"][netifaces.AF_INET][1]
4242
addrs = netifaces.ifaddresses(default_iface)
43-
broadcast_addr = addrs[netifaces.AF_INET][0].get('broadcast', '255.255.255.255')
43+
broadcast_addr = addrs[netifaces.AF_INET][0].get("broadcast", "255.255.255.255")
4444
except (KeyError, ValueError, OSError) as e:
4545
_LOGGER.warning("Could not determine broadcast address, using 255.255.255.255: %s", e)
46-
broadcast_addr = '255.255.255.255'
46+
broadcast_addr = "255.255.255.255"
4747
_LOGGER.debug("Sending discovery request to broadcast:%d (%s)", Bridge.PORT, broadcast_addr)
4848
self.transport.sendto(b"\x0a\x00", (broadcast_addr, Bridge.PORT))
4949

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ generated-members = [
7676
]
7777
extension-pkg-allow-list = [
7878
"aiocomfoconnect.protobuf.zehnder_pb2",
79-
"aiocomfoconnect.protobuf.nanopb_pb2"
79+
"aiocomfoconnect.protobuf.nanopb_pb2",
80+
"netifaces"
8081
]
8182

8283
[tool.pylint."MESSAGES CONTROL"]

0 commit comments

Comments
 (0)