From d7624ba08df0fd7b59714b7ffa1a1eada13a2f2e Mon Sep 17 00:00:00 2001 From: Simon Sawicki Date: Thu, 15 Feb 2024 00:32:10 +0100 Subject: [PATCH] Make autopep8 not change commit in pre-commit --- .pre-commit-config.yaml | 6 ++---- pyproject.toml | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e49634d2d5..4b794aa697 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,13 +3,11 @@ repos: hooks: - id: linter name: linter - entry: hatch run lint --no-fix + entry: hatch run lint language: system types: [python] - pass_filenames: false - id: format name: format - entry: hatch run format + entry: hatch run format --diff language: system types: [python] - pass_filenames: true diff --git a/pyproject.toml b/pyproject.toml index 003c13d2f9..ff2e59af1d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,7 +88,7 @@ dependencies = ["yt-dlp[dev]"] [tool.hatch.envs.default.scripts] install = "pre-commit install" lint = "ruff check {args:.}" -format = "autopep8 {args:.}" +format = "autopep8 {args:--in-place .}" tests = "python -m devscripts.run_tests {args}" [[tool.hatch.envs.default.overrides.env.TEST_ALL.matrix.value]] @@ -172,7 +172,6 @@ relative-imports-order = "closest-to-furthest" [tool.autopep8] max_line_length = 120 -in-place = true recursive = true jobs = 0