mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-25 11:54:06 +00:00
Use black as formatter and enable flake8/pylint
This commit is contained in:
parent
7d44710f44
commit
e32033f995
4 changed files with 3133 additions and 2729 deletions
|
|
@ -2,6 +2,7 @@ linux-system-roles/network
|
|||
==========================
|
||||
[](https://coveralls.io/github/linux-system-roles/network)
|
||||
[](https://travis-ci.org/linux-system-roles/network)
|
||||
[](https://github.com/ambv/black)
|
||||
|
||||
This role enables users to configure network on target machines.
|
||||
The role can be used to configure:
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
25
tox.ini
25
tox.ini
|
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = flake8, pylint, py{26,27,36,37}
|
||||
envlist = black, flake8, pylint, py{26,27,36,37}
|
||||
skipsdist = true
|
||||
skip_missing_interpreters = True
|
||||
|
||||
|
|
@ -17,8 +17,16 @@ setenv =
|
|||
LC_ALL = C
|
||||
changedir = {toxinidir}/tests
|
||||
covtarget = network_connections
|
||||
scriptfiles = library/network_connections.py tests/test_network_connections.py
|
||||
pytesttarget = .
|
||||
|
||||
[testenv:black]
|
||||
basepython = python3.6
|
||||
deps = black
|
||||
|
||||
commands = black --check --diff \
|
||||
{[base]scriptfiles}
|
||||
|
||||
[testenv:py26]
|
||||
passenv = {[base]passenv}
|
||||
setenv =
|
||||
|
|
@ -76,10 +84,12 @@ commands =
|
|||
{[base]pytesttarget}
|
||||
|
||||
[testenv:pylint]
|
||||
basepython = python2.7
|
||||
setenv =
|
||||
{[base]setenv}
|
||||
deps =
|
||||
pylint>=1.8.4
|
||||
ansible
|
||||
commands =
|
||||
pylint \
|
||||
--errors-only \
|
||||
|
|
@ -108,10 +118,19 @@ addopts = -rxs
|
|||
|
||||
[flake8]
|
||||
show_source = True
|
||||
max-line-length = 88
|
||||
ignore = E402,W503
|
||||
|
||||
[pylint]
|
||||
max-line-length = 88
|
||||
disable = wrong-import-position
|
||||
|
||||
[pycodestyle]
|
||||
max-line-length = 88
|
||||
|
||||
[travis]
|
||||
python =
|
||||
2.6: py26
|
||||
2.7: py27,coveralls
|
||||
3.6: py36
|
||||
2.7: py27,coveralls,flake8,pylint
|
||||
3.6: py36,black
|
||||
3.7: py37
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue