diff --git a/blinkpy/blinkpy.py b/blinkpy/blinkpy.py index 3e681517..027e2fff 100644 --- a/blinkpy/blinkpy.py +++ b/blinkpy/blinkpy.py @@ -17,8 +17,6 @@ import logging import datetime import aiofiles -from aiofiles import ospath - from requests.structures import CaseInsensitiveDict from dateutil.parser import parse from slugify import slugify @@ -414,7 +412,7 @@ async def _parse_downloaded_items(self, result, camera, path, delay, debug): filename = os.path.join(path, filename) if not debug: - if await ospath.isfile(filename): + if await aiofiles.ospath.isfile(filename): _LOGGER.info("%s already exists, skipping...", filename) continue diff --git a/blinkpy/helpers/util.py b/blinkpy/helpers/util.py index 88838836..524ab175 100644 --- a/blinkpy/helpers/util.py +++ b/blinkpy/helpers/util.py @@ -6,11 +6,11 @@ import time import secrets import re -import aiofiles from asyncio import sleep from calendar import timegm from functools import wraps from getpass import getpass +import aiofiles import dateutil.parser from blinkpy.helpers import constants as const diff --git a/pyproject.toml b/pyproject.toml index 9fab4e34..a8885ec2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ include-package-data = true include = ["blinkpy*"] [tool.ruff] -select = [ +lint.select = [ "C", # complexity "D", # docstrings "E", # pydocstyle @@ -54,11 +54,11 @@ select = [ "Q000", # Double quotes found but single quotes preferred "SIM118", # Use {key} in {dict} instead of {key} in {dict}.keys() "TRY004", # Prefer TypeError exception for invalid type - "TRY200", # Use raise from to specify exception cause + "B904", # Use raise from to specify exception cause "UP", # pyupgrade "W", # pycodestyle ] -ignore = [ +lint.ignore = [ "D202", # No blank lines allowed after function docstring "D203", # 1 blank line required before class docstring "D212", # Multi-line docstring summary should start at the first line @@ -86,10 +86,9 @@ ignore = [ line-length = 88 -target-version = "py311" +target-version = "py312" -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] - -[tool.ruff.mccabe] -max-complexity = 25 +[tool.ruff.lint.mccabe] + max-complexity = 25