Skip to content

Commit

Permalink
Build: Add pre-commit configuration for automated linting and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
LifeAdventurer committed Sep 10, 2024
1 parent 6553e3a commit 909dd74
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-toml
- id: check-yaml

- repo: https://github.com/python-poetry/poetry
rev: '1.8.3'
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
args: ["--without-hashes", "-f", "requirements.txt", "-o", "requirements.txt"]
- id: poetry-install

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
181 changes: 180 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ discord-py = "^2.4.0"

[tool.poetry.group.dev.dependencies]
ruff = "^0.6.4"
pre-commit = "^3.8.0"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 909dd74

Please sign in to comment.