lint check by pylama

This commit is contained in:
Petr Klima committed 2020-11-11 14:20:56 +01:00
1 parent e9d5398eaa
commit e3a650a0ed
2 files changed
+5 -17

No files matched your search

-2
View File
@@ -395,7 +395,6 @@ class S350Driver(NetworkDriver):
# from the first port and use it everywhere. # from the first port and use it everywhere.
if mac == '0': if mac == '0':
show_system_output = self._send_command('show lldp local ' + interface) show_system_output = self._send_command('show lldp local ' + interface)
mac = show_system_output.splitlines()[0].split(':', maxsplit=1)[1].strip() mac = show_system_output.splitlines()[0].split(':', maxsplit=1)[1].strip()
if speed == '--': if speed == '--':
@@ -546,7 +545,6 @@ class S350Driver(NetworkDriver):
""" fields length are diferent device to device, detect them on horizontal lin """ """ fields length are diferent device to device, detect them on horizontal lin """
fields_end = [m.start() for m in re.finditer(' ', dashline)] fields_end = [m.start() for m in re.finditer(' ', dashline)]
#fields_position.insert(0,0)
fields_end.append(len(dashline)) fields_end.append(len(dashline))
return fields_end return fields_end
+5 -15
View File
@@ -1,16 +1,8 @@
[tox] [tox]
envlist = py3{6,7,8},black,pylama #envlist = py3{6,7,8},black,pylama,sphinx
envlist = py3{6,7,8},pylama
skip_missing_interpreters = true skip_missing_interpreters = true
[travis]
python =
3.6: py36,black,pylama
[travis:env]
TRAVIS_BUILD_STAGE_NAME =
Lint: black,pylama
Test: py3{6,7,8}
[testenv] [testenv]
deps = deps =
-rrequirements.txt -rrequirements.txt
@@ -21,17 +13,16 @@ commands =
py.test --cov=napalm_s350 --cov-report term-missing -vs {posargs} py.test --cov=napalm_s350 --cov-report term-missing -vs {posargs}
[testenv:black] [testenv:black]
deps = black==18.9b0 deps =
-rrequirements-dev.txt
basepython = python3.6
commands = commands =
black --check . black --check --target-version py36 --line-length 100 --color --diff .
[testenv:pylama] [testenv:pylama]
deps = deps =
-rrequirements-dev.txt -rrequirements-dev.txt
basepython = python3.6
commands = commands =
pylama . pylama .
@@ -39,7 +30,6 @@ commands =
deps = deps =
-rdocs/requirements.txt -rdocs/requirements.txt
basepython = python3.6
commands = commands =
make doctest make doctest