| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,34 +1,17 @@ | |||
| 1 | 1 | repos: | |
| 2 | - - repo: https://github.com/asottile/pyupgrade | ||
| 3 | - rev: v3.15.0 | ||
| 2 | + - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| 3 | + rev: v0.4.0 | ||
| 4 | 4 | hooks: | |
| 5 | - - id: pyupgrade | ||
| 6 | - args: [--py38-plus] | ||
| 5 | + - id: ruff | ||
| 6 | + args: [--exit-non-zero-on-fix] | ||
| 7 | 7 | ||
| 8 | 8 | - repo: https://github.com/psf/black-pre-commit-mirror | |
| 9 | - rev: 24.1.1 | ||
| 9 | + rev: 24.4.0 | ||
| 10 | 10 | hooks: | |
| 11 | 11 | - id: black | |
| 12 | 12 | ||
| 13 | - - repo: https://github.com/PyCQA/isort | ||
| 14 | - rev: 5.13.2 | ||
| 15 | - hooks: | ||
| 16 | - - id: isort | ||
| 17 | - | ||
| 18 | - - repo: https://github.com/PyCQA/flake8 | ||
| 19 | - rev: 7.0.0 | ||
| 20 | - hooks: | ||
| 21 | - - id: flake8 | ||
| 22 | - additional_dependencies: | ||
| 23 | - [flake8-2020, flake8-implicit-str-concat, flake8-logging] | ||
| 24 | - | ||
| 25 | - - repo: https://github.com/pre-commit/pygrep-hooks | ||
| 26 | - rev: v1.10.0 | ||
| 27 | - hooks: | ||
| 28 | - - id: python-check-blanket-noqa | ||
| 29 | - | ||
| 30 | 13 | - repo: https://github.com/pre-commit/pre-commit-hooks | |
| 31 | - rev: v4.5.0 | ||
| 14 | + rev: v4.6.0 | ||
| 32 | 15 | hooks: | |
| 33 | 16 | - id: check-case-conflict | |
| 34 | 17 | - id: check-merge-conflict | |
@@ -39,7 +22,7 @@ repos: | |||
| 39 | 22 | - id: trailing-whitespace | |
| 40 | 23 | ||
| 41 | 24 | - repo: https://github.com/tox-dev/pyproject-fmt | |
| 42 | - rev: 1.7.0 | ||
| 25 | + rev: 1.8.0 | ||
| 43 | 26 | hooks: | |
| 44 | 27 | - id: pyproject-fmt | |
| 45 | 28 | args: [--max-supported-python=3.13] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -44,6 +44,32 @@ include = [ | |||
| 44 | 44 | "python_docs_theme/", | |
| 45 | 45 | ] | |
| 46 | 46 | ||
| 47 | - [tool.isort] | ||
| 48 | - add_imports = "from __future__ import annotations" | ||
| 49 | - profile = "black" | ||
| 47 | + [tool.ruff] | ||
| 48 | + fix = true | ||
| 49 | + | ||
| 50 | + [tool.ruff.lint] | ||
| 51 | + select = [ | ||
| 52 | + "C4", # flake8-comprehensions | ||
| 53 | + "E", # pycodestyle errors | ||
| 54 | + "F", # pyflakes errors | ||
| 55 | + "I", # isort | ||
| 56 | + "ISC", # flake8-implicit-str-concat | ||
| 57 | + "LOG", # flake8-logging | ||
| 58 | + "PGH", # pygrep-hooks | ||
| 59 | + "PYI", # flake8-pyi | ||
| 60 | + "RUF100", # unused noqa (yesqa) | ||
| 61 | + "RUF022", # unsorted-dunder-all | ||
| 62 | + "UP", # pyupgrade | ||
| 63 | + "W", # pycodestyle warnings | ||
| 64 | + "YTT", # flake8-2020 | ||
| 65 | + ] | ||
| 66 | + ignore = [ | ||
| 67 | + "E203", # Whitespace before ':' | ||
| 68 | + "E221", # Multiple spaces before operator | ||
| 69 | + "E226", # Missing whitespace around arithmetic operator | ||
| 70 | + "E241", # Multiple spaces after ',' | ||
| 71 | + ] | ||
| 72 | + | ||
| 73 | + | ||
| 74 | + [tool.ruff.lint.isort] | ||
| 75 | + required-imports = ["from __future__ import annotations"] | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,7 +24,7 @@ def _asset_hash(path: str) -> str: | |||
| 24 | 24 | def _add_asset_hashes(static: list[str], add_digest_to: list[str]) -> None: | |
| 25 | 25 | for asset in add_digest_to: | |
| 26 | 26 | index = static.index(asset) | |
| 27 | - static[index].filename = _asset_hash(asset) # type: ignore | ||
| 27 | + static[index].filename = _asset_hash(asset) # type: ignore[attr-defined] | ||
| 28 | 28 | ||
| 29 | 29 | ||
| 30 | 30 | def _html_page_context( | |
| Back | FazBrowse Home | New Git URL |
0 commit comments