diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f129026..e272e496 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,20 +7,20 @@ ci: autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks" repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.6 + rev: v0.9.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] stages: [pre-commit] - repo: https://github.com/pycqa/isort - rev: 5.13.2 + rev: 6.0.0 hooks: - id: isort stages: [pre-commit] - repo: https://github.com/psf/black - rev: 24.10.0 + rev: 25.1.0 hooks: - id: black stages: [pre-commit] diff --git a/nb_cli/handlers/data.py b/nb_cli/handlers/data.py index 6d36eac4..9303c122 100644 --- a/nb_cli/handlers/data.py +++ b/nb_cli/handlers/data.py @@ -8,7 +8,7 @@ # -- Windows support functions -- def _get_win_folder_from_registry( - csidl_name: Literal["CSIDL_APPDATA", "CSIDL_COMMON_APPDATA", "CSIDL_LOCAL_APPDATA"] + csidl_name: Literal["CSIDL_APPDATA", "CSIDL_COMMON_APPDATA", "CSIDL_LOCAL_APPDATA"], ) -> Path: """ This is a fallback technique at best. I'm not sure if using the @@ -32,7 +32,7 @@ def _get_win_folder_from_registry( def _get_win_folder_with_ctypes( - csidl_name: Literal["CSIDL_APPDATA", "CSIDL_COMMON_APPDATA", "CSIDL_LOCAL_APPDATA"] + csidl_name: Literal["CSIDL_APPDATA", "CSIDL_COMMON_APPDATA", "CSIDL_LOCAL_APPDATA"], ) -> Path: csidl_const = { "CSIDL_APPDATA": 26, diff --git a/nb_cli/handlers/meta.py b/nb_cli/handlers/meta.py index 03bcf97b..7264e760 100644 --- a/nb_cli/handlers/meta.py +++ b/nb_cli/handlers/meta.py @@ -42,7 +42,7 @@ def get_project_root(cwd: Optional[Path] = None) -> Path: def requires_project_root( - func: Callable[P, Coroutine[Any, Any, R]] + func: Callable[P, Coroutine[Any, Any, R]], ) -> Callable[P, Coroutine[Any, Any, R]]: @wraps(func) async def wrapper(*args: P.args, **kwargs: P.kwargs) -> R: @@ -135,7 +135,7 @@ async def get_python_version( def requires_python( - func: Callable[P, Coroutine[Any, Any, R]] + func: Callable[P, Coroutine[Any, Any, R]], ) -> Callable[P, Coroutine[Any, Any, R]]: @wraps(func) async def wrapper(*args: P.args, **kwargs: P.kwargs) -> R: @@ -198,7 +198,7 @@ async def get_nonebot_version( def requires_nonebot( - func: Callable[P, Coroutine[Any, Any, R]] + func: Callable[P, Coroutine[Any, Any, R]], ) -> Callable[P, Coroutine[Any, Any, R]]: @wraps(func) @requires_python @@ -257,7 +257,7 @@ async def get_pip_version( def requires_pip( - func: Callable[P, Coroutine[Any, Any, R]] + func: Callable[P, Coroutine[Any, Any, R]], ) -> Callable[P, Coroutine[Any, Any, R]]: @wraps(func) @requires_python diff --git a/nb_cli/handlers/process.py b/nb_cli/handlers/process.py index 991c9db2..cd724cae 100644 --- a/nb_cli/handlers/process.py +++ b/nb_cli/handlers/process.py @@ -17,7 +17,7 @@ def ensure_process_terminated( - func: Callable[P, Coroutine[Any, Any, asyncio.subprocess.Process]] + func: Callable[P, Coroutine[Any, Any, asyncio.subprocess.Process]], ) -> Callable[P, Coroutine[Any, Any, asyncio.subprocess.Process]]: tasks: set[asyncio.Task] = set() diff --git a/nb_cli/handlers/signal.py b/nb_cli/handlers/signal.py index 94d6db0d..c1359671 100644 --- a/nb_cli/handlers/signal.py +++ b/nb_cli/handlers/signal.py @@ -60,7 +60,7 @@ def handle_signal(signum: int, frame: Optional[FrameType]) -> None: def register_signal_handler( - handler: Callable[[int, Optional[FrameType]], None] + handler: Callable[[int, Optional[FrameType]], None], ) -> None: handlers.append(handler)