diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..7a018c3 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,13 @@ +repos: +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.0.292 + hooks: + - id: ruff + args: [ --fix, --exit-non-zero-on-fix ] + +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: end-of-file-fixer + types: [python] + - id: check-merge-conflict diff --git a/pyproject.toml b/pyproject.toml index 7adf291..e4dca19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,8 +37,9 @@ dev = [ "mypy", # linting "myst-parser", # markdown parsing "pytest", # testing - "ruff", # linting - "sphinx" # documentation + "ruff==0.0.292", # linting + "sphinx", # documentation + "pre-commit==3.4.0", # manages and maintains pre-commit hooks ] test = [ diff --git a/requirements.txt b/requirements.txt index 816a246..8502bb3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,6 @@ rich==13.6.0 pydantic==2.4.2 pathlib==1.0.1 pydantic-settings==2.0.3 -pydub==0.25.1 \ No newline at end of file +pydub==0.25.1 +ruff==0.0.292 +pre-commit==3.4.0 \ No newline at end of file