Skip to content

Commit

Permalink
Introduce style enforcement (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaLiN2223 committed Nov 28, 2020
1 parent 54ed706 commit ffa8113
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .flake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
ignore = E203, E266, E501, W503, F403, F401, W291
max-line-length = 120
max-complexity = 18
select = B,C,E,F,W,T4,B9
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
language_version: python3.6
args: [--line-length=120] # this should be in pyproject.toml not sure why its not picked up
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies: [flake8-typing-imports==1.9.0]
args: ['--config=.flake']
17 changes: 17 additions & 0 deletions pyprojet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.black]
line-length = 120
target-version = ['py36']
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''

0 comments on commit ffa8113

Please sign in to comment.