Skip to content

Commit

Permalink
Fix additional dependencies (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
paddyroddy authored Oct 30, 2023
1 parent c84e09e commit 8154a16
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__pycache__
*.egg-info
48 changes: 30 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,50 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.2
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- id: forbid-tabs
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort-fix
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
hooks:
- id: mypy
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
args:
- --fix=lf
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 37.33.6
hooks:
- id: renovate-config-validator
args:
- renovate/default-config.json
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.2
hooks:
- id: ruff
args:
- --exit-non-zero-on-fix
- --fix
- id: ruff-format
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.0
hooks:
- id: check-github-actions
- id: check-github-workflows
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 37.33.6
hooks:
- id: renovate-config-validator
args:
- renovate/default-config.json
6 changes: 6 additions & 0 deletions precommit/python/python-hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ repos:
rev: v1.6.1
hooks:
- id: mypy
additional_dependencies:
# for this bit to work this repo includes a pyproject.toml, without
# which these dependencies would not be installed
- numpy
- pydantic
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
Expand All @@ -27,6 +32,7 @@ repos:
- id: check-docstring-first
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
args:
Expand Down
21 changes: 21 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[project]
authors = [
{email = "[email protected]", name = "Patrick J. Roddy"},
]
description = """
This file is only present as the additional_dependencies in pre-commit require a
setup.py or pyproject.toml, otherwise it will not install them
"""
name = "pre_commit_placeholder_package"
readme = "README.md"
version = "0.0.0"
license.file = "README.md"

[tool.ruff]
fix = true
force-exclude = true

[tool.tomlsort]
all = true
spaces_indent_inline_array = 4
trailing_comma_inline_array = true

0 comments on commit 8154a16

Please sign in to comment.