diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index be2de9c..54233bb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-case-conflict - id: check-ast @@ -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: @@ -61,13 +56,14 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.1 + rev: v0.1.3 hooks: - id: ruff args: ["--fix", "--show-fixes"] + - id: ruff-format - repo: https://github.com/scientific-python/cookie - rev: "2023.09.21" + rev: "2023.10.27" hooks: - id: sp-repo-review additional_dependencies: ["repo-review[cli]"] diff --git a/docs/source/conf.py b/docs/source/conf.py index 3ba2cc6..48e8b37 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -181,7 +181,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 7adffde..b92de2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,21 +87,20 @@ 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.1.1" + "ruff==0.1.3" ] detached = true [tool.hatch.envs.lint.scripts] style = [ "ruff {args:.}", - "black --check --diff {args:.}", + "ruff format {args:.}", "mdformat --check {args:docs *.md}" ] fmt = [ - "black {args:.}", "ruff --fix {args:.}", + "ruff format {args:.}", "mdformat {args:docs *.md}" ] @@ -141,16 +140,14 @@ 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"] [tool.ruff] -target-version = "py38" line-length = 100 +target-version = "py38" + +[tool.ruff.lint] select = [ - "A", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "ISC", "N", + "A", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "N", "PLC", "PLE", "PLR", "PLW", "Q", "RUF", "S", "SIM", "T", "TID", "UP", "W", "YTT", ] @@ -175,7 +172,7 @@ unfixable = [ "RUF100", ] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] # B011: Do not call assert False since python -O removes these calls # F841 local variable 'foo' is assigned to but never used # S101 Use of `assert` detected