◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
9 changes: 4 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
hooks:
- id: ruff-format
exclude: ^git/ext/
- id: ruff
args: ["--fix"]
exclude: ^doc|^git/ext/

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
hooks:
- id: shellcheck
args: [--color]
exclude: ^test/fixtures/polyglot$|^git/ext/

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-toml
- id: check-yaml
Expand Down
31 changes: 17 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,34 @@ line-length = 120
# Exclude a variety of commonly ignored directories.
exclude = [
"git/ext/",
"doc",
"build",
"dist",
]
# 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/
# "S", # see: https://pypi.org/project/flake8-bandit
# "UP", # see: https://docs.astral.sh/ruff/rules/#pyupgrade-up
]
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
"TCH004", # see: https://docs.astral.sh/ruff/rules/runtime-import-in-type-checking-block/
]
lint.ignore = [
"E203",
"E731", # Do not assign a `lambda` expression, use a `def`
]
lint.ignore-init-module-imports = true
lint.unfixable = ["F401"]

[tool.ruff.lint.per-file-ignores]
"test/**" = ["B018"]
5 changes: 3 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
-r requirements.txt
-r test-requirements.txt

# libraries for additional local testing/linting - to be added to test-requirements.txt when all pass

pytest-icdiff
# pytest-profiling
Toggle all file notes Toggle all file annotations