Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,27 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-docstring-first
- id: check-added-large-files
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
- id: name-tests-test
args: [--pytest-test-first]
- id: trailing-whitespace
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v3.2.0
- id: check-merge-conflict
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.15.2
hooks:
- id: setup-cfg-fmt
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.25
hooks:
- id: validate-pyproject
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
rev: v0.15.0
hooks:
# Run the formatter.
- id: ruff-format
# Run the linter.
- id: ruff-check
args: [--fix,--unsafe-fixes]
args: [--fix,--unsafe-fixes]
24 changes: 15 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,18 @@ dlclive = [
"modelzoo/project_configs/*.yaml",
]

# [tool.ruff]
# lint.select = ["E", "F", "B", "I", "UP"]
# lint.ignore = ["E741"]
# target-version = "py310"
# fix = true
# line-length = 120

# [tool.ruff.lint.pydocstyle]
# convention = "google"
[tool.ruff]
lint.select = ["E", "F", "B", "I", "UP"]
lint.ignore = ["E741"]
target-version = "py310"
fix = true
line-length = 120

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

[tool.pyproject-fmt]
max_supported_python = "3.12"
generate_python_version_classifiers = true
# Avoid collapsing tables to field.key = value format (less readable)
table_format = "long"