Skip to content

Commit

Permalink
ci: update pre-commit hooks and pyproject ruff config
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Aug 7, 2024
1 parent dedd8d8 commit 5688c41
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
23 changes: 10 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
repos:
# Versioning: Commit messages & changelog
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
rev: v3.28.0
hooks:
- id: commitizen
stages: [commit-msg]

# Autoformat: Python code
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black

# Lint / autoformat: Python code
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: "v0.1.6"
rev: "v0.5.6"
hooks:
# Run the linter
- id: ruff
args: [--exit-non-zero-on-fix]
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter
- id: ruff-format

# Autoformat: YAML, JSON, Markdown, etc.
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
- repo: https://github.com/pycontribs/mirrors-prettier
rev: v3.3.3
hooks:
- id: prettier
args: [--ignore-unknown, --no-error-on-unmatched-pattern, "!chart/**"]
args: [--ignore-unknown, --no-error-on-unmatched-pattern]

# Lint: Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
rev: v0.41.0
hooks:
- id: markdownlint
args: [--fix, --ignore, CHANGELOG.md]
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ target-versions = ["py39", "py310", "py311"]
[tool.ruff]
fix = true
line-length = 132
target-version = "py310"
select = ["I", "E", "W", "D", "B", "F", "N", "Q"]
ignore = ["N805", "B008"]
target-version = "py39"
exclude = [
".git",
".ruff_cache",
Expand All @@ -86,5 +84,7 @@ exclude = [
"dist",
"osm_login_python/__version__.py",
]
[tool.ruff.pydocstyle]
[tool.ruff.lint]
select = ["I", "E", "W", "D", "B", "F", "N", "Q"]
[tool.ruff.lint.pydocstyle]
convention = "google"

0 comments on commit 5688c41

Please sign in to comment.