Use black as formatter and enable flake8/pylint

This commit is contained in:
Till Maas 2018-07-16 09:16:24 +02:00
parent 7d44710f44
commit e32033f995
4 changed files with 3133 additions and 2729 deletions

View file

@ -2,6 +2,7 @@ linux-system-roles/network
==========================
[![Coverage Status](https://coveralls.io/repos/github/linux-system-roles/network/badge.svg)](https://coveralls.io/github/linux-system-roles/network)
[![Travis Build Status](https://travis-ci.org/linux-system-roles/network.svg?branch=master)](https://travis-ci.org/linux-system-roles/network)
[![Code Style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](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
View file

@ -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