Add initial black formatting (#104)

Closes: #88
This commit is contained in:
Allan Feldman
2019-08-29 10:20:42 -07:00
committed by GitHub
parent 5480b0eee6
commit 5b00ddcaed
4 changed files with 13 additions and 3 deletions

2
.flake8 Normal file
View File

@ -0,0 +1,2 @@
[flake8]
ignore = E501,W503,E203

View File

@ -1,3 +1,6 @@
[settings]
force_single_line=True
from_first=True
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=79

View File

@ -65,7 +65,10 @@ disable=missing-docstring,
too-few-public-methods, # Might be good to re-enable this later.
too-many-instance-attributes,
too-many-arguments,
ungrouped-imports # Leave this up to isort
ungrouped-imports, # Leave this up to isort
wrong-import-order, # Leave this up to isort
bad-continuation, # Leave this up to black
line-too-long # Leave this up to black
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option

View File

@ -45,6 +45,7 @@ deps =
pylint~=2.3
flake8~=3.7
isort~=4.3
black>=19.3b0,==19.*
commands_pre =
pip install -e {toxinidir}/opentelemetry-api
@ -55,6 +56,7 @@ commands_pre =
commands =
; Prefer putting everything in one pylint command to profit from duplication
; warnings.
black --check --diff opentelemetry-api/src/opentelemetry opentelemetry-api/tests/ opentelemetry-sdk/src/opentelemetry opentelemetry-sdk/tests/ ext/opentelemetry-ext-http-requests/src/ ext/opentelemetry-ext-http-requests/tests/ ext/opentelemetry-ext-wsgi/tests/
pylint opentelemetry-api/src/opentelemetry opentelemetry-api/tests/ opentelemetry-sdk/src/opentelemetry opentelemetry-sdk/tests/ ext/opentelemetry-ext-http-requests/src/ ext/opentelemetry-ext-http-requests/tests/ ext/opentelemetry-ext-wsgi/tests/
flake8 opentelemetry-api/src/ opentelemetry-api/tests/ opentelemetry-sdk/src/ opentelemetry-sdk/tests/ ext/opentelemetry-ext-wsgi/src/ ext/opentelemetry-ext-wsgi/tests/ ext/opentelemetry-ext-http-requests/src/
isort --check-only --recursive opentelemetry-api/src opentelemetry-sdk/src ext/opentelemetry-ext-wsgi/src ext/opentelemetry-ext-wsgi/tests ext/opentelemetry-ext-http-requests/src/