# usually to register additional checkers.
load-plugins=
+# A comma-separated list of package or module names from where C extensions may
+# be loaded. Extensions are loading into the active Python interpreter and may
+# run arbitrary code
+extension-pkg-whitelist=numpy, scipy
[MESSAGES CONTROL]
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
-disable=redefined-variable-type, locally-disabled
+disable=redefined-variable-type, locally-disabled, locally-enabled
[REPORTS]
class DropRateSearch(object):
"""Abstract class with search algorithm implementation."""
+ #TODO DropRateSearch should be refactored as part of CSIT-1378
+ #pylint: disable=too-many-instance-attributes
__metaclass__ = ABCMeta
class GBPSubnetType(IntEnum):
"""GBP Subnet Type."""
GBP_API_SUBNET_TRANSPORT = 1
- GBP_API_SUBNET_STITCHED_INTERNAL = 2
- GBP_API_SUBNET_STITCHED_EXTERNAL = 3
+ GBP_API_SUBNET_STITCHED_INTERNAL = 2 # pylint: disable=invalid-name
+ GBP_API_SUBNET_STITCHED_EXTERNAL = 3 # pylint: disable=invalid-name
GBP_API_SUBNET_L3_OUT = 4
GBP_API_SUBNET_ANON_L3_OUT = 5
class FibPathFlags(IntEnum):
"""FIB path flags."""
FIB_PATH_FLAG_NONE = 0
- FIB_PATH_FLAG_RESOLVE_VIA_ATTACHED = 1
+ FIB_PATH_FLAG_RESOLVE_VIA_ATTACHED = 1 #pylint: disable=invalid-name
FIB_PATH_FLAG_RESOLVE_VIA_HOST = 2
class LinkBondLoadBalance(IntEnum):
"""Link bonding load balance."""
- L2 = 0
+ L2 = 0 # pylint: disable=invalid-name
L34 = 1
L23 = 2
# Package path has to be one level above the vpp_papi directory.
package_path = package_path.rsplit('/', 1)[0]
sys.path.append(package_path)
+ # pylint: disable=import-error
from vpp_papi.vpp_papi import VPPApiClient as vpp_class
vpp_class.apidir = api_json_directory
# We need to create instance before removing from sys.path.
"\n{apis}".format(host=self._node["host"],
apis=api_data))
raise
- except Exception as exc:
+ except Exception as exc: # pylint: disable=broad-except
raise_from(RuntimeError(
"PAPI command(s) execution on host {host} "
"failed: {apis}".format(
# we need to encode them, so that repr() does not lead with 'u'.
if isinstance(rate, unicode):
rate = rate.encode("utf-8")
- if isinstance(duration, unicode):
- duration = duration.encode("utf-8")
- if isinstance(warmup_time, unicode):
- warmup_time = warmup_time.encode("utf-8")
+ if not isinstance(duration, (float, int)):
+ duration = float(duration)
+ if not isinstance(warmup_time, (float, int)):
+ warmup_time = float(warmup_time)
command = (
"sh -c '{tool}/resources/tools/trex/trex_stateless_profile.py"
" --profile {prof}/resources/traffic_profiles/trex/{traffic}.py"
self._tty,
'sudo -S {0}{1}'.format(Constants.VAT_BIN_NAME, json_text),
self.__VAT_PROMPT)
- except Exception:
+ except Exception: #pylint: disable=broad-except
continue
else:
break
raise RuntimeError("More instances of VPP running on node "
"{0}. VAT command {1} execution failed.".
format(self._node['host'], cmd))
- else:
- raise RuntimeError("VPP not running on node {0}. VAT command "
- "{1} execution failed.".
- format(self._node['host'], cmd))
+ raise RuntimeError("VPP not running on node {0}. VAT command "
+ "{1} execution failed.".
+ format(self._node['host'], cmd))
logger.debug("VAT output: {0}".format(out))
if self.json:
# TODO: Tox prints various warnings. Figure them out and fix them.
[testenv:pylint]
+basepython = python2
deps =
pylint==1.5.4
-r ./requirements.txt