Skip to content

Commit

Permalink
Add pre-commit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Nov 26, 2023
1 parent 1652dec commit e7b9365
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
37 changes: 36 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,36 @@
repos: []
# To enable this pre-commit hook run:
# `pip install pre-commit` or `brew install pre-commit`
# Then run `pre-commit install`

# Learn more about this config here: https://pre-commit.com

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-toml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
- id: requirements-txt-fixer

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
hooks:
- id: ruff


- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli
args:
[--skip, "*.po"]

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.15
hooks:
- id: validate-pyproject
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ include_trailing_comma = true
known_first_party = ["formtools"]
line_length = 79
multi_line_output = 5

2 changes: 1 addition & 1 deletion tests/wizard/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class TestWizardWithInitAttrs(TestWizard):

class TestWizardWithTypeCheck(TestWizard):
def done(self, form_list, **kwargs):
assert type(form_list) is list, "`form_list` was {}, should be a list".format(type(form_list))
assert isinstance(form_list, list), f"`form_list` was {type(form_list)}, should be a list"
return http.HttpResponse("All good")


Expand Down

0 comments on commit e7b9365

Please sign in to comment.