Fix linting issues

This commit is contained in:
kotoriのねこ 2023-11-06 03:10:47 -05:00 committed by GitHub
parent 8b15e083b7
commit 014986c1ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 6 deletions

View File

@ -2,4 +2,4 @@
from core.services.devices.services import DevicesService from core.services.devices.services import DevicesService
__all__ = "DevicesService" __all__ = ("DevicesService",)

View File

@ -1,4 +1,3 @@
import datetime
from datetime import datetime from datetime import datetime
from typing import Optional, TYPE_CHECKING from typing import Optional, TYPE_CHECKING

View File

@ -47,7 +47,7 @@ try:
from python_genshin_artifact.models.skill import SkillInfo from python_genshin_artifact.models.skill import SkillInfo
GENSHIN_ARTIFACT_FUNCTION_AVAILABLE = True GENSHIN_ARTIFACT_FUNCTION_AVAILABLE = True
except ImportError as exc: except ImportError:
get_damage_analysis = None get_damage_analysis = None
get_transformative_damage = None get_transformative_damage = None
enka_parser = None enka_parser = None

View File

@ -10,7 +10,7 @@ __all__ = ("HashLock",)
_lock: "LockType" = Lock() _lock: "LockType" = Lock()
_locks: Dict[int, "LockType"] = {} _locks: Dict[int, "LockType"] = {}
_clean_lock_task_map: Dict[int, Task] _clean_lock_task_map: Dict[int, Task] = {}
async def delete_lock(target: int) -> None: async def delete_lock(target: int) -> None:
@ -42,7 +42,7 @@ class HashLock:
target = hash(target) target = hash(target)
self.target = target self.target = target
def __enter__(self) -> None: def __enter__(self) -> bool:
# noinspection PyTypeChecker # noinspection PyTypeChecker
return self.lock.__enter__() return self.lock.__enter__()

View File

@ -1,5 +1,5 @@
# pylint: disable=W0049 # pylint: disable=W0049
from typing import NoReturn, Optional, Protocol, TypeVar from typing import Optional, Protocol, TypeVar
__all__ = ["BaseQueue", "SyncQueue", "AsyncQueue"] __all__ = ["BaseQueue", "SyncQueue", "AsyncQueue"]