Skip to content

Commit

Permalink
Add linting (ruff & mypy) and pre-commit hook configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
glrs committed Oct 4, 2024
1 parent b71e687 commit 004d6d7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
hooks:
- id: ruff
args: [ --fix, --exit-zero ]

- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
language_version: python3.11

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
19 changes: 19 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[tool.ruff]
select = [
"E4",
"E7",
"E9",
"F",
"I",
"UP"
]
ignore = [
"E402",
"E501",
"E722",
"E741"
]

[tool.mypy]
ignore_missing_imports = true
follow_imports = "skip"

0 comments on commit 004d6d7

Please sign in to comment.