From 5802b880b73df4732e8dccf5421daedaf60f1b5d Mon Sep 17 00:00:00 2001 From: Dario Date: Sat, 17 Aug 2019 17:41:12 +0200 Subject: [PATCH 1/3] Black-Formatting Init --- .pre-commit-config.yaml | 6 +++++ .travis.yml | 1 + pyproject.toml | 12 +++++++++ requirements.txt | 54 +++++++++++++++++++++++------------------ 4 files changed, 50 insertions(+), 23 deletions(-) create mode 100644 .pre-commit-config.yaml create mode 100644 pyproject.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..b268b62 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: +- repo: https://github.com/ambv/black + rev: stable + hooks: + - id: black + language_version: python3.7 diff --git a/.travis.yml b/.travis.yml index 229ebda..0a2933a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,3 +6,4 @@ install: - pip-sync script: - pytest -vv -s + - black --check . diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d9ba56e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,12 @@ +[tool.black] +line-length = 119 +exclude = ''' +/( + \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | migrations/* +)/ +''' diff --git a/requirements.txt b/requirements.txt index 6eea953..34b7c31 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,23 +1,31 @@ -# -# This file is autogenerated by pip-compile -# To update, run: -# -# pip-compile --output-file requirements.txt requirements.in -# -atomicwrites==1.1.5 # via pytest -attrs==18.1.0 # via pytest -colorama==0.3.9 # via pytest -django-cors-headers==2.2.0 -django-money==0.14 -django==2.0.3 -djangorestframework==3.8.2 -gunicorn==19.8.1 -model-mommy==1.6.0 -more-itertools==4.2.0 # via pytest -pluggy==0.6.0 # via pytest -py-moneyed==0.7.0 # via django-money -py==1.5.3 # via pytest -pytest-django==3.3.2 -pytest==3.6.2 -pytz==2018.4 # via django -six==1.11.0 # via model-mommy, more-itertools, pytest +appdirs==1.4.3 +aspy.yaml==1.3.0 +atomicwrites==1.1.5 +attrs==18.1.0 +black==19.3b0 +cfgv==2.0.1 +Click==7.0 +colorama==0.3.9 +Django==2.0.3 +django-cors-headers==2.2.0 +django-money==0.14 +djangorestframework==3.8.2 +gunicorn==19.8.1 +identify==1.4.6 +importlib-metadata==0.19 +model-mommy==1.6.0 +more-itertools==4.2.0 +nodeenv==1.3.3 +pip-tools==4.0.0 +pluggy==0.6.0 +pre-commit==1.18.2 +py==1.5.3 +py-moneyed==0.7.0 +pytest==3.6.2 +pytest-django==3.3.2 +pytz==2018.4 +PyYAML==5.1.2 +six==1.11.0 +toml==0.10.0 +virtualenv==16.7.3 +zipp==0.5.2 From eb587713a4134e743511394efc4ee1f40eb2f67c Mon Sep 17 00:00:00 2001 From: Dario Date: Sat, 17 Aug 2019 17:42:24 +0200 Subject: [PATCH 2/3] Updated Requirements.txt --- requirements.txt | 44 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/requirements.txt b/requirements.txt index 34b7c31..71e0fe9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,31 +1,25 @@ -appdirs==1.4.3 -aspy.yaml==1.3.0 -atomicwrites==1.1.5 -attrs==18.1.0 -black==19.3b0 -cfgv==2.0.1 -Click==7.0 -colorama==0.3.9 -Django==2.0.3 +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile --output-file=requirements.txt requirements.in +# +atomicwrites==1.1.5 # via pytest +attrs==18.1.0 # via pytest django-cors-headers==2.2.0 django-money==0.14 +django==2.0.3 djangorestframework==3.8.2 gunicorn==19.8.1 -identify==1.4.6 -importlib-metadata==0.19 model-mommy==1.6.0 -more-itertools==4.2.0 -nodeenv==1.3.3 -pip-tools==4.0.0 -pluggy==0.6.0 -pre-commit==1.18.2 -py==1.5.3 -py-moneyed==0.7.0 -pytest==3.6.2 +more-itertools==4.2.0 # via pytest +pluggy==0.6.0 # via pytest +py-moneyed==0.7.0 # via django-money +py==1.5.3 # via pytest pytest-django==3.3.2 -pytz==2018.4 -PyYAML==5.1.2 -six==1.11.0 -toml==0.10.0 -virtualenv==16.7.3 -zipp==0.5.2 +pytest==3.6.2 +pytz==2018.4 # via django +six==1.11.0 # via model-mommy, more-itertools, pytest + +# The following packages are considered to be unsafe in a requirements file: +# setuptools==41.1.0 # via django-money, pytest From 1816d9c52ff1bca4a2612cbc85280d510abcbe46 Mon Sep 17 00:00:00 2001 From: Dario Date: Sat, 17 Aug 2019 17:46:23 +0200 Subject: [PATCH 3/3] Requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 71e0fe9..137a6b3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,6 +20,6 @@ pytest-django==3.3.2 pytest==3.6.2 pytz==2018.4 # via django six==1.11.0 # via model-mommy, more-itertools, pytest - +black # The following packages are considered to be unsafe in a requirements file: # setuptools==41.1.0 # via django-money, pytest