Skip to content

Commit

Permalink
ci: Update pre-commit hooks and linter versions. (tektronix#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
nfelt14 authored Feb 6, 2024
1 parent 5bfc7fb commit 0dabe4b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repos:
- id: check-github-actions
- id: check-github-workflows
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.14.0
rev: v3.14.1
hooks:
- id: commitizen
stages: [commit-msg]
Expand Down Expand Up @@ -125,7 +125,7 @@ repos:
always_run: true
args: [., --min=10]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.15
rev: v0.2.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
34 changes: 14 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ poetry = ">=1.5.1"
pre-commit = ">=2.20.0"
pre-commit-update = ">=0.1.3"
pylint = {extras = ["spelling"], version = "3.0.3"} # Update this by running scripts/update_development_dependencies.py
pyright = "1.1.349" # Update this by running scripts/update_development_dependencies.py
pyright = "1.1.350" # Update this by running scripts/update_development_dependencies.py
pyroma = ">=4.2"
pytest = ">=7.1.2"
pytest-cov = ">=3.0.0"
pytest-html = ">=4.0"
pytest-order = ">=1.0.1"
pytest-profiling = ">=1.7.0"
python-semantic-release = ">=8.5.1"
ruff = "0.1.15" # Update this by running scripts/update_development_dependencies.py
ruff = "0.2.1" # Update this by running scripts/update_development_dependencies.py
safety = ">=2.1.1"
sphinx-autoapi = ">=2.0.0"
sphinx-copybutton = ">=0.5.1"
Expand Down Expand Up @@ -267,13 +267,21 @@ ignore_directives = [
]

[tool.ruff]
line-length = 100
namespace-packages = ["examples/**", "scripts/**", "tests/**"]
src = ["docs", "examples", "scripts", "src", "tests"]
target-version = "py38" # always generate Python 3.8 compatible code

[tool.ruff.lint]
allowed-confusables = ["¸", "×"]
fixable = [
"F401",
"FLY002",
"I",
"RUF100"
]
flake8-pytest-style = {mark-parentheses = false}
flake8-quotes = {docstring-quotes = "double"}
ignore = [
"ANN101", # Missing type annotation for self in method
"ANN102", # Missing type annotation for cls in method
Expand All @@ -297,23 +305,15 @@ ignore = [
"UP024", # Replace aliased errors with `OSError`
"UP037" # Remove quotes from type annotation
]
line-length = 100
namespace-packages = ["examples/**", "scripts/**", "tests/**"]
pydocstyle = {convention = "google"}
pylint = {max-args = 7}
# https://beta.ruff.rs/docs/rules/
select = [
"ALL"
]
src = ["docs", "examples", "scripts", "src", "tests"]
target-version = "py38" # always generate Python 3.8 compatible code
task-tags = ["FIXME", "FUTURE", "RELIC", "TODO"]

[tool.ruff.flake8-pytest-style]
mark-parentheses = false

[tool.ruff.flake8-quotes]
docstring-quotes = "double"

[tool.ruff.isort]
[tool.ruff.lint.isort]
force-sort-within-sections = false
known-first-party = [
"conftest",
Expand All @@ -323,7 +323,7 @@ known-first-party = [
lines-between-types = 1
order-by-type = false

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"examples/**" = [
"S101" # Use of assert detected
]
Expand Down Expand Up @@ -355,12 +355,6 @@ order-by-type = false
"PYI053" # String and bytes literals longer than 50 characters are not permitted
]

[tool.ruff.pydocstyle]
convention = "google"

[tool.ruff.pylint]
max-args = 7

[tool.semantic_release]
version_toml = [
"pyproject.toml:tool.poetry.version"
Expand Down

0 comments on commit 0dabe4b

Please sign in to comment.