Skip to content

Commit

Permalink
final tweaking of configs for a (relatively) sane pre-commit workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneknapp committed Oct 14, 2024
1 parent bab61d9 commit a04f406
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .codespellrc

This file was deleted.

1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
# I101: Imported names are in the wrong order. Should be
# F841: local variable ... is assigned to but never used
ignore = E, C, W, I100, I101, D400, F841
builtins = c
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,24 @@ repos:
additional_dependencies:
- tomli

# misc stuff
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
# ref: https://github.com/pre-commit/pre-commit-hooks#hooks-available
hooks:
# Autoformat: Makes sure files end in a newline and only a newline.
- id: end-of-file-fixer

# Autoformat: Sorts entries in requirements.txt.
- id: requirements-txt-fixer

# Lint: Check for files with names that would conflict on a
# case-insensitive filesystem like MacOS HFS+ or Windows FAT.
- id: check-case-conflict

# Lint: Checks that non-binary executables have a proper shebang.
- id: check-executables-have-shebangs

# pre-commit.ci config reference: https://pre-commit.ci/#configuration
#ci:
# autoupdate_schedule: monthly
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[tool.black]
# target-version should be all supported versions
target-version = ['py37', 'py38', 'py39', 'py310']

[tool.isort]
profile = "black"

[tool.codespell]
skip = '.git,*.pdf,*.svg,vendor/grafana/dashboards/*,deployments/*/secrets/*'
ignore-words-list = 'demog,wasn'

0 comments on commit a04f406

Please sign in to comment.