Alexandros Kosiaris has submitted this change and it was merged.
Change subject: varnish: Fix PEP8 violations
......................................................................
varnish: Fix PEP8 violations
* F401 'string' imported but unused
* F821 undefined name 'key'
* F401 'VarnishLogProcessor' imported but unused
The undefined name 'key' warning is an actual bug found by flake8.
The modules/varnish/files/varnishapi.py is excluded from linting as it
is an exact copy of the upstream file.
Change-Id: I657a75779b5b523758a61549a7624af650a3d3f0
---
M modules/varnish/files/ganglia/ganglia-vhtcpd.py
M modules/varnish/files/varnishprocessor/__init__.py
M modules/varnish/files/zerofetch.py
M tox.ini
4 files changed, 4 insertions(+), 4 deletions(-)
Approvals:
Alexandros Kosiaris: Verified; Looks good to me, approved
diff --git a/modules/varnish/files/ganglia/ganglia-vhtcpd.py
b/modules/varnish/files/ganglia/ganglia-vhtcpd.py
index f4a4267..1e72fe0 100644
--- a/modules/varnish/files/ganglia/ganglia-vhtcpd.py
+++ b/modules/varnish/files/ganglia/ganglia-vhtcpd.py
@@ -123,7 +123,7 @@
global CONF
for k, v in params.iteritems():
- CONF[key] = v
+ CONF[k] = v
skel = {
'name': 'XXX',
diff --git a/modules/varnish/files/varnishprocessor/__init__.py
b/modules/varnish/files/varnishprocessor/__init__.py
index b6cc654..c73bf42 100644
--- a/modules/varnish/files/varnishprocessor/__init__.py
+++ b/modules/varnish/files/varnishprocessor/__init__.py
@@ -1 +1 @@
-from .varnishprocessor import VarnishLogProcessor
+from .varnishprocessor import VarnishLogProcessor # noqa
diff --git a/modules/varnish/files/zerofetch.py
b/modules/varnish/files/zerofetch.py
index 50a04e5..310ebeb 100755
--- a/modules/varnish/files/zerofetch.py
+++ b/modules/varnish/files/zerofetch.py
@@ -9,7 +9,6 @@
# netmapper's perspective.
import os
-import string
import argparse
import tempfile
import json
diff --git a/tox.ini b/tox.ini
index f887c65..653b97c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,7 +9,8 @@
# E123/E133, E226 and E241/E242 are default ignores
# E402: module level import not at top of file
ignore = E123,E133,E226,E241,E242,E402
-exclude = modules/letsencrypt/files/acme_tiny.py
+# Upstream files that don't pass flake8 but should not be locally modified
+exclude =
modules/letsencrypt/files/acme_tiny.py,modules/varnish/files/varnishapi.py
[testenv]
deps =
--
To view, visit https://gerrit.wikimedia.org/r/291187
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I657a75779b5b523758a61549a7624af650a3d3f0
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Ema <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits