Skip to content

Commit

Permalink
🔧 Update config files
Browse files Browse the repository at this point in the history
  • Loading branch information
sgraaf committed Oct 11, 2023
1 parent 919a54a commit 98a01f7
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 23 deletions.
17 changes: 15 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
ci:
autofix_commit_msg: |
:art: [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autoupdate_schedule: quarterly
autoupdate_commit_msg: ":arrow_up: [pre-commit.ci] pre-commit autoupdate"

default_language_version:
# Black recommends specifying the latest version of Python supported
python: python3.12

exclude: "^{{cookiecutter\\.project_name}}/"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand All @@ -9,11 +22,11 @@ repos:
- id: trailing-whitespace
- id: check-added-large-files
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.3
rev: 0.27.0
hooks:
- id: check-github-workflows
name: validate github workflows
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
rev: v3.0.3
hooks:
- id: prettier
22 changes: 12 additions & 10 deletions {{cookiecutter.project_name}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

ci:
autofix_commit_msg: |
:art: [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autoupdate_schedule: monthly
autoupdate_schedule: quarterly
autoupdate_commit_msg: ":arrow_up: [pre-commit.ci] pre-commit autoupdate"

default_language_version:
# Black recommends specifying the latest version of Python supported
python: python3.12

repos:
Expand All @@ -20,40 +24,38 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.13
rev: v0.14
hooks:
- id: validate-pyproject
name: validate pyproject.toml
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.3
rev: 0.27.0
hooks:
- id: check-github-workflows
name: validate github workflows
- id: check-readthedocs
name: validate readthedocs config
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.277
rev: v0.0.292
hooks:
- id: ruff
args:
- --fix
- --exit-non-zero-on-fix
- --show-fixes
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.5.1
hooks:
- id: mypy
additional_dependencies:
- types-requests
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
rev: v3.0.3
hooks:
- id: prettier
3 changes: 3 additions & 0 deletions {{cookiecutter.project_name}}/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
Expand Down
26 changes: 15 additions & 11 deletions {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,22 @@ name = "{{ cookiecutter.package_name }}"

[tool.ruff]
select = [
"B",
"C90",
"E",
"F",
"I",
"UP",
"RUF100",
"W",
"E", # pycodestyle errors
"W", # pycodestyle warnings
"B", # flake8-bugbear
"F", # pyflakes
"I", # isort
"C90", # mccabe
"UP", # pyupgrade
"RUF100", # unused noqa
]
ignore = [
"E501", # line too long, handled by black
]
ignore = ["E501"]
src = ["src"]
target-version = "py38"
target-version = "py38" # the minimum Python version supported, used by pyupgrade

[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]
"__init__.py" = [
"F401", # unused import
]

0 comments on commit 98a01f7

Please sign in to comment.