Skip to content

Commit

Permalink
Bump deps to fix CI on py3.11 (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Jul 19, 2023
1 parent c1ea0ea commit 1cb5ef8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion flux_led/aiodevice.py
Expand Up @@ -662,7 +662,7 @@ async def _async_device_config_resync(self) -> None:
async def _async_connect(self) -> None:
"""Create connection."""
async with asyncio_timeout(self.timeout):
_, self._aio_protocol = await self.loop.create_connection( # type: ignore
_, self._aio_protocol = await self.loop.create_connection(
lambda: AIOLEDENETProtocol(
self._async_data_recieved, self._async_connection_lost
),
Expand Down
6 changes: 3 additions & 3 deletions flux_led/aioscanner.py
Expand Up @@ -2,7 +2,7 @@
import contextlib
import logging
import time
from typing import Callable, Dict, List, Optional, Tuple, cast
from typing import Callable, Dict, List, Optional, Tuple

from .aioutils import asyncio_timeout
from .scanner import MESSAGE_SEND_INTERLEAVE_DELAY, BulbScanner, FluxLEDDiscovery
Expand Down Expand Up @@ -95,7 +95,7 @@ def _on_response(data: bytes, addr: Tuple[str, int]) -> None:
),
sock=sock,
)
transport = cast(asyncio.DatagramTransport, transport_proto[0])
transport = transport_proto[0]
commands: List[bytes] = []
if messages:
commands.extend(messages)
Expand Down Expand Up @@ -159,7 +159,7 @@ def _on_response(data: bytes, addr: Tuple[str, int]) -> None:
),
sock=sock,
)
transport = cast(asyncio.DatagramTransport, transport_proto[0])
transport = transport_proto[0]
try:
await self._async_run_scan(
transport, destination, timeout, found_all_future
Expand Down
2 changes: 0 additions & 2 deletions flux_led/pattern.py
Expand Up @@ -600,8 +600,6 @@
91: "Seven-color Wave, Breathe Sync",
92: "Seven-color Breathe Sync, Flash Sync",
93: "Seven-color Flash Sync, Jump Sync",
93: "Seven-color Flash Sync, Jump Sync",
93: "Seven-color Flash Sync, Jump Sync",
94: "Seven-color Wave, Breathe Sync, Flash Sync, Jump Sync",
95: "Overlap Red, Green, Blue",
96: "Overlap Red, Green, Blue, Cyan, Purple, White",
Expand Down
6 changes: 3 additions & 3 deletions flux_led/scanner.py
Expand Up @@ -6,7 +6,7 @@
import sys
import time
from datetime import date
from typing import Dict, List, Optional, Tuple, Union, cast
from typing import Dict, List, Optional, Tuple, Union

from .const import (
ATTR_FIRMWARE_DATE,
Expand Down Expand Up @@ -83,7 +83,7 @@ def merge_discoveries(target: FluxLEDDiscovery, source: FluxLEDDiscovery) -> Non
"""Merge keys from a second discovery that may be missing from the first one."""
for k, v in source.items():
if target.get(k) is None:
target[k] = v # type: ignore[misc]
target[k] = v # type: ignore[literal-required]


def _strip_new_lines(msg: str) -> str:
Expand Down Expand Up @@ -137,7 +137,7 @@ def _process_version_message(data: FluxLEDDiscovery, decoded_data: str) -> None:
if len(data_split) == 4:
data[ATTR_MODEL_INFO] = data_split[3]
data[ATTR_MODEL_DESCRIPTION] = get_model_description(
cast(int, data[ATTR_MODEL_NUM]), data[ATTR_MODEL_INFO]
data[ATTR_MODEL_NUM], data[ATTR_MODEL_INFO]
)


Expand Down
2 changes: 1 addition & 1 deletion flux_led/sock.py
Expand Up @@ -13,7 +13,7 @@
from .device import WifiLedBulb


def _socket_retry(attempts: int = DEFAULT_RETRIES) -> WrapFuncType:
def _socket_retry(attempts: int = DEFAULT_RETRIES) -> WrapFuncType: # type: ignore[type-var]
"""Define a wrapper to retry on socket failures."""

def decorator_retry(func: WrapFuncType) -> WrapFuncType:
Expand Down
10 changes: 5 additions & 5 deletions requirements_test.txt
@@ -1,6 +1,6 @@
webcolors
pylint==2.11.1
pytest-asyncio==0.16.0
pytest-cov==3.0.0
mypy==0.910
flake8==4.0.1
pylint==2.17.4
pytest-asyncio==0.21.1
pytest-cov==4.1.0
mypy==1.4.1
flake8==6.0.0

0 comments on commit 1cb5ef8

Please sign in to comment.