Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit suggestions (#163)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and Borda authored Jul 18, 2024
1 parent 1003f7e commit dadad0c
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 57 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -29,7 +29,7 @@ repos:
args: ["--print-width=120"]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies: [tomli]
Expand All @@ -45,17 +45,17 @@ repos:
- mdformat_frontmatter

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.2
rev: v0.5.2
hooks:
- id: ruff-format
- id: ruff
args: ["--fix"]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
rev: 2.1.4
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
rev: v0.18
hooks:
- id: validate-pyproject
108 changes: 56 additions & 52 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,59 @@ target-version = "py38"
line-length = 120
# Enable Pyflakes `E` and `F` codes by default.
lint.select = [
"E", "W", # see: https://pypi.org/project/pycodestyle
"F", # see: https://pypi.org/project/pyflakes
"I", #see: https://pypi.org/project/isort/
"D", # see: https://pypi.org/project/pydocstyle
"N", # see: https://pypi.org/project/pep8-naming
"S", # see: https://pypi.org/project/flake8-bandit
"UP", # see: https://docs.astral.sh/ruff/rules/#pyupgrade-up
"D", # see: https://pypi.org/project/pydocstyle
"E",
"F", # see: https://pypi.org/project/pyflakes
"I", #see: https://pypi.org/project/isort/
"N", # see: https://pypi.org/project/pep8-naming
"S", # see: https://pypi.org/project/flake8-bandit
"UP", # see: https://docs.astral.sh/ruff/rules/#pyupgrade-up
"W", # see: https://pypi.org/project/pycodestyle
]
lint.extend-select = [
"A", # see: https://pypi.org/project/flake8-builtins
"B", # see: https://pypi.org/project/flake8-bugbear
"C4", # see: https://pypi.org/project/flake8-comprehensions
"PT", # see: https://pypi.org/project/flake8-pytest-style
"RET", # see: https://pypi.org/project/flake8-return
"SIM", # see: https://pypi.org/project/flake8-simplify
"YTT", # see: https://pypi.org/project/flake8-2020
"ANN", # see: https://pypi.org/project/flake8-annotations
"TID", # see: https://pypi.org/project/flake8-tidy-imports/
"T10", # see: https://pypi.org/project/flake8-debugger
"Q", # see: https://pypi.org/project/flake8-quotes
"EXE", # see: https://pypi.org/project/flake8-executable
"ISC", # see: https://pypi.org/project/flake8-implicit-str-concat
"PIE", # see: https://pypi.org/project/flake8-pie
"PLE", # see: https://pypi.org/project/pylint/
"PERF", # see: https://pypi.org/project/perflint/
"PYI", # see: https://pypi.org/project/flake8-pyi/
"RUF", # see: https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
"A", # see: https://pypi.org/project/flake8-builtins
"ANN", # see: https://pypi.org/project/flake8-annotations
"B", # see: https://pypi.org/project/flake8-bugbear
"C4", # see: https://pypi.org/project/flake8-comprehensions
"EXE", # see: https://pypi.org/project/flake8-executable
"ISC", # see: https://pypi.org/project/flake8-implicit-str-concat
"PERF", # see: https://pypi.org/project/perflint/
"PIE", # see: https://pypi.org/project/flake8-pie
"PLE", # see: https://pypi.org/project/pylint/
"PT", # see: https://pypi.org/project/flake8-pytest-style
"PYI", # see: https://pypi.org/project/flake8-pyi/
"Q", # see: https://pypi.org/project/flake8-quotes
"RET", # see: https://pypi.org/project/flake8-return
"RUF", # see: https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
"SIM", # see: https://pypi.org/project/flake8-simplify
"T10", # see: https://pypi.org/project/flake8-debugger
"TID", # see: https://pypi.org/project/flake8-tidy-imports/
"YTT", # see: https://pypi.org/project/flake8-2020
]
lint.ignore-init-module-imports = true
lint.unfixable = ["F401"]
lint.ignore = [
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
]

[tool.ruff.lint.per-file-ignores]
"setup.py" = ["D100", "SIM115"]
"__about__.py" = ["D100"]
"__init__.py" = ["D100"]

[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = "google"

lint.per-file-ignores."__about__.py" = [
"D100",
]
lint.per-file-ignores."__init__.py" = [
"D100",
]
#[tool.ruff.pycodestyle]
#ignore-overlong-task-comments = true

[tool.ruff.lint.mccabe]
lint.per-file-ignores."setup.py" = [
"D100",
"SIM115",
]
lint.unfixable = [
"F401",
]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
lint.mccabe.max-complexity = 10
# Use Google-style docstrings.
lint.pydocstyle.convention = "google"
lint.ignore-init-module-imports = true

[tool.isort]
profile = "black"
Expand All @@ -75,18 +79,18 @@ quiet-level = 3

[tool.pytest.ini_options]
norecursedirs = [
".git",
".github",
"dist",
"build",
"docs",
".git",
".github",
"dist",
"build",
"docs",
]
addopts = [
"--strict-markers",
"--doctest-modules",
# "--doctest-plus",
"--color=yes",
"--disable-pytest-warnings",
"--strict-markers",
"--doctest-modules",
# "--doctest-plus",
"--color=yes",
"--disable-pytest-warnings",
]
# ToDo
#filterwarnings = ["error::FutureWarning"]
Expand All @@ -95,6 +99,6 @@ junit_duration_report = "call"

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"pass",
"pragma: no cover",
"pass",
]

0 comments on commit dadad0c

Please sign in to comment.