Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions nb_cli/handlers/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions nb_cli/handlers/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nb_cli/handlers/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion nb_cli/handlers/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down