Skip to content

Commit

Permalink
Setup pre-commit and fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jkawamoto committed Jan 15, 2023
1 parent 3f760c5 commit e800f26
Show file tree
Hide file tree
Showing 7 changed files with 153 additions and 6 deletions.
1 change: 0 additions & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ tag = True
[bumpversion:file:README.rst]

[bumpversion:file:docs/source/conf.py]

2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
max-line-length = 120
extend-ignore = E203
exclude = .tox
exclude = .tox
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,3 @@ ENV/

# Rope project settings
.ropeproject


21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "0.6.0"
hooks:
- id: tox-ini-fmt
- repo: local
hooks:
- id: tox
name: run tox
entry: poetry run tox
language: python
files: .py$
pass_filenames: false
130 changes: 129 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ tox = "^4.2.8"
isort = "^5.11.4"
black = "^22.12.0"
flake8 = "^6.0.0"
pre-commit = "^2.21.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ commands =
poetry run flake8 .
allowlist_externals = poetry
commands_pre =
poetry install -v
poetry install -v

0 comments on commit e800f26

Please sign in to comment.