Skip to content

Commit

Permalink
feat(style): default Python version on pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Nov 12, 2023
1 parent 676ac24 commit 3557c1f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/nitpick/resources/python/pre-commit-hooks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
name = "pre-commit hooks for Python projects"
url = "https://pre-commit.com/hooks"

[".pre-commit-config.yaml".default_language_version]
# https://pre-commit.com/#top_level-default_language_version
python = "python3.11"

[[".pre-commit-config.yaml".repos]]
repo = "https://github.com/pre-commit/pygrep-hooks"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
default_language_version:
python: python3.11
repos:
- repo: https://github.com/pre-commit/pygrep-hooks
hooks:
Expand Down
4 changes: 4 additions & 0 deletions tests/test_builtin/real.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
ci:
skip: [local-nitpick, generate-docs, pylint]

# https://pre-commit.com/#top_level-default_language_version
default_language_version:
python: python3.11

repos:
- repo: local
hooks:
Expand Down

0 comments on commit 3557c1f

Please sign in to comment.