diff options
author | Vratko Polak <vrpolak@cisco.com> | 2019-12-04 13:24:07 +0100 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-12-05 07:03:57 +0000 |
commit | 063abf35e81deaf749ebbcfee339fbd1d9e89412 (patch) | |
tree | c932eac04f162c46b0f3c38db10105b945a617cb /resources/traffic_scripts/policer.py | |
parent | 6221f1b96d2a167c6db74ff26cd7ec7906ae9486 (diff) |
Deal with some "pylint: disable=" comments
+ When possible, fix the violation.
+ Else, add a comment:
+ An explanation (if not already present) and keep disable.
+ A TODO (if not already present) and remove the disable.
- This makes tox job report more pylint violations,
but any such violation is fixable and should be fixed.
- Although some need to be fixed in VPP, such as enum item long names.
Change-Id: I48604b5eda070083d79dff1439620dbd9e798e1f
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/traffic_scripts/policer.py')
-rwxr-xr-x | resources/traffic_scripts/policer.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/resources/traffic_scripts/policer.py b/resources/traffic_scripts/policer.py index c222c76152..97cad612ac 100755 --- a/resources/traffic_scripts/policer.py +++ b/resources/traffic_scripts/policer.py @@ -19,10 +19,6 @@ import sys import logging from ipaddress import ip_address -# pylint: disable=no-name-in-module -# pylint: disable=import-error -logging.getLogger("scapy.runtime").setLevel(logging.ERROR) - from scapy.layers.l2 import Ether from scapy.layers.inet import IP, TCP from scapy.layers.inet6 import IPv6, ICMPv6ND_NS @@ -72,8 +68,7 @@ def check_ipv6(pkt_recv, dscp): raise RuntimeError(f"Not a TCP packet received: {pkt_recv!r}") -# pylint: disable=too-many-locals -# pylint: disable=too-many-statements +# TODO: Pylint says too-many-locals and too-many-statements. Refactor! def main(): """Send and receive TCP packet.""" args = TrafficScriptArg( |