diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7bd364d..baa5f33 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,11 +42,6 @@ repos: - id: blacken-docs additional_dependencies: [black==23.7.0] - - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.9.1 - hooks: - - id: black - - repo: https://github.com/codespell-project/codespell rev: "v2.2.6" hooks: @@ -63,6 +58,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.0.292 hooks: + - id: ruff-format - id: ruff args: ["--fix", "--show-fixes"] diff --git a/doc/conf.py b/doc/conf.py index 77e1246..7080b9e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -106,7 +106,7 @@ # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -# html_theme_options = {} +html_theme_options = {"navigation_with_keys": False} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] diff --git a/pyproject.toml b/pyproject.toml index 7b11727..604eea5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,19 +52,18 @@ test = "mypy --install-types --non-interactive {args}" [tool.hatch.envs.lint] dependencies = [ - "black[jupyter]==23.3.0", "mdformat>0.7", "mdformat-gfm>=0.3.5", - "ruff==0.0.270" + "ruff==0.1.2" ] [tool.hatch.envs.lint.scripts] style = [ + "ruff format {args:.}", "ruff {args:.}", - "black --check --diff {args:.}", "mdformat --check {args:doc *.md}" ] fmt = [ - "black {args:.}", + "ruff format {args:.}", "ruff --fix {args:.}", "mdformat {args:doc *.md}" ] @@ -114,23 +113,15 @@ show_error_codes = true enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] warn_unreachable = true -[tool.black] -line-length = 100 -skip-string-normalization = true -target-version = ["py38"] -extend-exclude = "^tests.*ipynb$" - [tool.ruff] target-version = "py38" line-length = 100 select = [ "A", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "ISC", "N", - "PLC", "PLE", "PLR", "PLW", "Q", "RUF", "S", "SIM", "T", "TID", "UP", + "PLC", "PLE", "PLR", "PLW", "RUF", "S", "SIM", "T", "TID", "UP", "W", "YTT", ] ignore = [ - # Q000 Single quotes found but double quotes preferred - "Q000", # FBT001 Boolean positional arg in function definition "FBT001", "FBT002", "FBT003", # E501 Line too long (158 > 100 characters) @@ -141,6 +132,8 @@ ignore = [ "T201", # N802 Function name `CreateWellKnownSid` should be lowercase "N802", "N803", + # Rules that conflict with the formatter. + "ISC001", "W191", ] unfixable = [ # Don't touch print statements @@ -170,8 +163,5 @@ ignore-nested-classes=true fail-under=100 exclude = ["demos", "doc", "tests"] -[tool.codespell] -ignore-words-list = "incase" - [tool.repo-review] -ignore = ["PY007", "PP308", "GH102", "PC140"] +ignore = ["PY007", "PP308", "GH102", "PC140", "PC110"] diff --git a/terminado/management.py b/terminado/management.py index 2e555c1..c814cf7 100644 --- a/terminado/management.py +++ b/terminado/management.py @@ -288,9 +288,7 @@ async def shutdown(self) -> None: """Shutdown the manager.""" await self.kill_all() if not self._blocking_io_executor_is_external: - self.blocking_io_executor.shutdown( - wait=False, cancel_futures=True - ) # type:ignore[call-arg] + self.blocking_io_executor.shutdown(wait=False, cancel_futures=True) # type:ignore[call-arg] async def kill_all(self) -> None: """Kill all terminals."""