Skip to content

Commit d909a7e

Browse files
carpecodeumhiranthaR
authored andcommitted
Add automatic pre-commit fixes in code formatting using flake8 and black
1 parent e0f43f9 commit d909a7e

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

labellab-flask/.flake8

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
ignore = E203, E266, E501, W503, F403, F401
3+
max-line-length = 79
4+
max-complexity = 18
5+
select = B,C,E,F,W,T4,B9

labellab-flask/pre-commit-config.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
repos:
2+
- repo: https://github.com/ambv/black
3+
rev: stable
4+
hooks:
5+
- id: black
6+
language_version: python3.6
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v1.2.3
9+
hooks:
10+
- id: flake8

labellab-flask/requirements.txt

+13
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ absl-py==0.9.0
22
alembic==1.4.2
33
astroid==1.6.6
44
astunparse==1.6.3
5+
appdirs==1.4.4
56
backports.functools-lru-cache==1.5
67
bcrypt==3.1.7
78
beautifulsoup4==4.8.1
89
bs4==0.0.1
910
cachetools==4.1.0
1011
certifi==2019.11.28
1112
cffi==1.14.0
13+
cfgv==3.2.0
1214
chardet==3.0.4
1315
Click==7.0
1416
colorama==0.4.3
@@ -17,7 +19,10 @@ cmake==3.14.3
1719
configparser==3.7.4
1820
coverage==5.2.1
1921
cycler==0.10.0
22+
distlib==0.3.1
2023
enum34==1.1.6
24+
filelock==3.0.12
25+
flake8==3.7.7
2126
Flask==1.1.1
2227
Flask-Bcrypt==0.7.1
2328
Flask-Cors==3.0.8
@@ -32,8 +37,10 @@ futures==3.1.1
3237
gast==0.3.3
3338
grpcio==1.29.0
3439
h5py==2.10.0
40+
identify==1.4.29
3541
idna==2.8
3642
importlib-metadata==1.6.1
43+
importlib-resources==3.0.0
3744
isort==4.3.21
3845
itsdangerous==1.1.0
3946
Jinja2==2.11.1
@@ -48,6 +55,7 @@ marshmallow==2.21.0
4855
marshmallow-sqlalchemy==0.17.1
4956
mccabe==0.6.1
5057
nose==1.3.7
58+
nodeenv==1.5.0
5159
numpy==1.16.4
5260
oauthlib==3.1.0
5361
onnx==1.6.0
@@ -57,9 +65,12 @@ pandas==1.0.4
5765
pep8==1.7.1
5866
Pillow==7.1.2
5967
protobuf==3.12.2
68+
pre-commit==1.17.0
6069
pyasn1==0.4.8
6170
pyasn1-modules==0.2.8
71+
pycodestyle==2.5.0
6272
pycparser==2.20
73+
pyflakes==2.1.1
6374
PyJWT==1.7.1
6475
pylint==1.9.4
6576
PyMySQL==0.9.3
@@ -68,6 +79,7 @@ python-dateutil==2.8.1
6879
python-dotenv==0.11.0
6980
python-editor==1.0.4
7081
pytz==2019.3
82+
pyyaml==5.3.1
7183
requests==2.22.0
7284
requests-oauthlib==1.3.0
7385
rsa==4.6
@@ -85,6 +97,7 @@ tensorflow-estimator==2.2.0
8597
termcolor==1.1.0
8698
tf-estimator-nightly==2.3.0.dev2020061601
8799
tf2onnx==1.6.2
100+
toml==0.10.1
88101
typing==3.7.4.1
89102
typing-extensions==3.7.4.2
90103
urllib3==1.25.9

pyproject.toml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[tool.black]
2+
line-length = 79
3+
include = '\.pyi?$'
4+
exclude = '''
5+
/(
6+
\.git
7+
| \.hg
8+
| \.mypy_cache
9+
| \.tox
10+
| \.venv
11+
| _build
12+
| buck-out
13+
| build
14+
| migrations
15+
| dist
16+
| venv
17+
)/
18+
'''

0 commit comments

Comments
 (0)