Skip to content

Commit

Permalink
chore: add pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rizhiy committed May 27, 2024
1 parent 7389321 commit f7050eb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.5
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.1.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Home = "https://github.com/Rizhiy/class-cache"

[project.optional-dependencies]
test = ["pytest", "pytest-cov", "replete[testing]"]
dev = ["black", "class-cache[test]", "ruff"]
dev = ["black", "class-cache[test]", "pre-commit", "ruff"]

[tool.flit.sdist]
include = ["README.md"]
Expand Down
1 change: 0 additions & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from class_cache import Cache, CacheWithDefault

TEST_KEY = "class_cache.tests.core.key"
Expand Down

0 comments on commit f7050eb

Please sign in to comment.