kbandla / dpkt

fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols
Other
1.09k stars 270 forks source link

Flake8 Code Cleanup #513

Closed brifordwylie closed 3 years ago

brifordwylie commented 3 years ago

This ticket/issue is related to #512 but this is just general cleanup.

flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
./setup.py:48:1: E124 closing bracket does not match visual indentation
./docs/conf.py:10:1: F401 'types' imported but unused
./examples/old/nbtping.py:40:72: E502 the backslash is redundant between brackets
./examples/old/dhcprequest.py:24:46: E203 whitespace before ','
./examples/old/dhcprequest.py:24:50: E203 whitespace before ','
./examples/old/dhcprequest.py:56:8: E251 unexpected spaces around keyword / parameter equals
./examples/old/dhcprequest.py:56:10: E251 unexpected spaces around keyword / parameter equals
./examples/old/dhcprequest.py:57:8: E251 unexpected spaces around keyword / parameter equals
./examples/old/dhcprequest.py:57:10: E251 unexpected spaces around keyword / parameter equals
./examples/old/dhcprequest.py:58:9: E251 unexpected spaces around keyword / parameter equals
./examples/old/dhcprequest.py:58:11: E251 unexpected spaces around keyword / parameter equals
./examples/old/dhcprequest.py:59:6: E251 unexpected spaces around keyword / parameter equals
./examples/old/dhcprequest.py:59:8: E251 unexpected spaces around keyword / parameter equals
./examples/old/dhcprequest.py:65:8: E251 unexpected spaces around keyword / parameter equals
./examples/old/dhcprequest.py:65:10: E251 unexpected spaces around keyword / parameter equals
./examples/old/dhcprequest.py:66:9: E251 unexpected spaces around keyword / parameter equals
./examples/old/dhcprequest.py:66:11: E251 unexpected spaces around keyword / parameter equals
./examples/old/dhcprequest.py:73:1: W391 blank line at end of file
./examples/old/dnsping.py:5:14: E401 multiple imports on one line
./examples/old/dnsping.py:50:56: E502 the backslash is redundant between brackets
./examples/old/ping.py:3:12: E401 multiple imports on one line
./examples/old/ping.py:23:1: W293 blank line contains whitespace
./examples/old/ping.py:24:5: C901 'Ping.main' is too complex (12)
./examples/old/ping.py:28:1: W293 blank line contains whitespace
./examples/old/ping.py:37:1: W293 blank line contains whitespace
./examples/old/ping.py:48:1: W293 blank line contains whitespace
./examples/old/ping.py:49:37: E701 multiple statements on one line (colon)
./examples/old/ping.py:50:37: E701 multiple statements on one line (colon)
./examples/old/ping.py:64:83: E502 the backslash is redundant between brackets
./examples/old/ping.py:67:29: E701 multiple statements on one line (colon)
./examples/old/ping.py:85:1: W293 blank line contains whitespace
./examples/old/ping.py:95:1: W293 blank line contains whitespace
./examples/old/ping.py:106:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/icmp6.py:51:1: W293 blank line contains whitespace
./dpkt/icmp6.py:66:25: E701 multiple statements on one line (colon)
./dpkt/icmp6.py:71:28: E701 multiple statements on one line (colon)
./dpkt/rip.py:34:9: E741 ambiguous variable name 'l'
./dpkt/rip.py:78:128: E501 line too long (185 > 127 characters)
./dpkt/telnet.py:35:1: C901 'strip_options' is too complex (11)
./dpkt/telnet.py:37:5: E741 ambiguous variable name 'l'
./dpkt/telnet.py:65:25: E701 multiple statements on one line (colon)
./dpkt/telnet.py:71:5: E741 ambiguous variable name 'l'
./dpkt/telnet.py:72:128: E501 line too long (481 > 127 characters)
./dpkt/telnet.py:74:128: E501 line too long (197 > 127 characters)
./dpkt/telnet.py:76:128: E501 line too long (824 > 127 characters)
./dpkt/gzip.py:76:5: C901 'Gzip.unpack' is too complex (12)
./dpkt/gzip.py:108:9: E741 ambiguous variable name 'l'
./dpkt/gzip.py:139:1: E302 expected 2 blank lines, found 1
./dpkt/gzip.py:145:38: E261 at least two spaces before inline comment
./dpkt/gzip.py:146:50: E261 at least two spaces before inline comment
./dpkt/gzip.py:147:54: E261 at least two spaces before inline comment
./dpkt/gzip.py:148:64: E261 at least two spaces before inline comment
./dpkt/gzip.py:149:51: E261 at least two spaces before inline comment
./dpkt/gzip.py:169:48: E261 at least two spaces before inline comment
./dpkt/gzip.py:172:58: E261 at least two spaces before inline comment
./dpkt/dpkt.py:4:39: W291 trailing whitespace
./dpkt/dpkt.py:51:62: W291 trailing whitespace
./dpkt/dpkt.py:124:9: E741 ambiguous variable name 'l'
./dpkt/dpkt.py:149:1: W293 blank line contains whitespace
./dpkt/dpkt.py:184:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/dpkt.py:184:128: E501 line too long (275 > 127 characters)
./dpkt/dpkt.py:228:1: E302 expected 2 blank lines, found 1
./dpkt/dpkt.py:247:1: E302 expected 2 blank lines, found 1
./dpkt/dpkt.py:263:1: E302 expected 2 blank lines, found 1
./dpkt/dpkt.py:273:1: W391 blank line at end of file
./dpkt/sll.py:40:128: E501 line too long (161 > 127 characters)
./dpkt/sll.py:49:128: E501 line too long (162 > 127 characters)
./dpkt/compat.py:20:5: F401 'io.StringIO' imported but unused
./dpkt/compat.py:22:5: W291 trailing whitespace
./dpkt/compat.py:24:20: W291 trailing whitespace
./dpkt/compat.py:25:5: F401 'io.BytesIO' imported but unused
./dpkt/dtp.py:30:16: E741 ambiguous variable name 'l'
./dpkt/dtp.py:38:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/radiotap.py:314:5: E303 too many blank lines (2)
./dpkt/snoop.py:149:23: E701 multiple statements on one line (colon)
./dpkt/dns.py:255:9: C901 'DNS.RR.pack_rdata' is too complex (12)
./dpkt/dns.py:268:17: E741 ambiguous variable name 'l'
./dpkt/dns.py:289:9: C901 'DNS.RR.unpack_rdata' is too complex (13)
./dpkt/dns.py:302:17: E122 continuation line missing indentation or outdented
./dpkt/dns.py:389:1: E266 too many leading '#' for block comment
./dpkt/dns.py:451:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:459:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:475:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:487:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:493:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:499:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:510:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:513:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:516:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:519:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:522:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:525:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:528:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:531:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:534:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:544:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:557:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:562:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:567:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:571:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:580:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:629:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:640:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:651:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:662:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:673:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:685:128: E501 line too long (128 > 127 characters)
./dpkt/dns.py:688:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:699:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:700:8: E225 missing whitespace around operator
./dpkt/dns.py:710:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:724:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:734:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:743:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:773:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:799:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:817:20: E222 multiple spaces after operator
./dpkt/dns.py:820:22: E222 multiple spaces after operator
./dpkt/dns.py:823:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:851:1: E302 expected 2 blank lines, found 1
./dpkt/dns.py:876:1: E302 expected 2 blank lines, found 1
./dpkt/sip.py:50:1: W391 blank line at end of file
./dpkt/edp.py:2:39: W291 trailing whitespace
./dpkt/edp.py:31:128: E501 line too long (1264 > 127 characters)
./dpkt/pcap.py:359:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:375:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:404:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:454:5: F841 local variable 'reader' is assigned to but never used
./dpkt/pcap.py:456:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:467:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:473:128: E501 line too long (135 > 127 characters)
./dpkt/pcap.py:496:17: F821 undefined name 'writer'
./dpkt/pcap.py:500:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:503:5: F821 undefined name 'writer'
./dpkt/pcap.py:506:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:509:5: F821 undefined name 'writer'
./dpkt/pcap.py:512:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:516:5: F821 undefined name 'writer'
./dpkt/pcap.py:519:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:524:5: F821 undefined name 'writer'
./dpkt/pcap.py:528:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:531:5: F821 undefined name 'writer'
./dpkt/pcap.py:534:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:537:5: F821 undefined name 'writer'
./dpkt/pcap.py:540:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:543:5: F821 undefined name 'writer'
./dpkt/pcap.py:546:1: E302 expected 2 blank lines, found 1
./dpkt/pcap.py:556:5: F821 undefined name 'writer'
./dpkt/gre.py:92:13: E741 ambiguous variable name 'l'
./dpkt/gre.py:148:1: E302 expected 2 blank lines, found 1
./dpkt/gre.py:152:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/ieee80211.py:280:5: C901 'IEEE80211.unpack' is too complex (12)
./dpkt/ieee80211.py:660:1: E302 expected 2 blank lines, found 1
./dpkt/ieee80211.py:661:128: E501 line too long (1087 > 127 characters)
./dpkt/ieee80211.py:683:1: E302 expected 2 blank lines, found 1
./dpkt/ieee80211.py:684:128: E501 line too long (299 > 127 characters)
./dpkt/ieee80211.py:691:128: E501 line too long (203 > 127 characters)
./dpkt/ieee80211.py:699:1: E302 expected 2 blank lines, found 1
./dpkt/ieee80211.py:700:128: E501 line too long (643 > 127 characters)
./dpkt/ieee80211.py:707:128: E501 line too long (539 > 127 characters)
./dpkt/ieee80211.py:711:1: E302 expected 2 blank lines, found 1
./dpkt/ieee80211.py:712:128: E501 line too long (147 > 127 characters)
./dpkt/ieee80211.py:716:1: E302 expected 2 blank lines, found 1
./dpkt/ieee80211.py:720:128: E501 line too long (131 > 127 characters)
./dpkt/ieee80211.py:730:128: E501 line too long (147 > 127 characters)
./dpkt/ieee80211.py:748:1: E302 expected 2 blank lines, found 1
./dpkt/ieee80211.py:749:128: E501 line too long (139 > 127 characters)
./dpkt/ieee80211.py:760:1: E302 expected 2 blank lines, found 1
./dpkt/ieee80211.py:761:128: E501 line too long (159 > 127 characters)
./dpkt/ieee80211.py:771:1: E302 expected 2 blank lines, found 1
./dpkt/ieee80211.py:772:128: E501 line too long (159 > 127 characters)
./dpkt/ieee80211.py:783:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/h225.py:134:9: E741 ambiguous variable name 'l'
./dpkt/h225.py:194:128: E501 line too long (4173 > 127 characters)
./dpkt/bgp.py:175:13: E741 ambiguous variable name 'l'
./dpkt/bgp.py:235:13: E741 ambiguous variable name 'l'
./dpkt/bgp.py:246:13: E741 ambiguous variable name 'l'
./dpkt/bgp.py:255:13: E741 ambiguous variable name 'l'
./dpkt/bgp.py:315:13: C901 'BGP.Update.Attribute.unpack' is too complex (14)
./dpkt/bgp.py:378:21: E741 ambiguous variable name 'l'
./dpkt/bgp.py:403:25: E741 ambiguous variable name 'l'
./dpkt/bgp.py:427:25: E741 ambiguous variable name 'l'
./dpkt/bgp.py:482:21: E741 ambiguous variable name 'l'
./dpkt/bgp.py:522:21: E741 ambiguous variable name 'l'
./dpkt/bgp.py:551:21: E741 ambiguous variable name 'l'
./dpkt/bgp.py:564:21: E741 ambiguous variable name 'l'
./dpkt/bgp.py:583:21: E741 ambiguous variable name 'l'
./dpkt/bgp.py:632:21: E741 ambiguous variable name 'l'
./dpkt/bgp.py:704:1: E302 expected 2 blank lines, found 1
./dpkt/bgp.py:792:128: E501 line too long (408 > 127 characters)
./dpkt/bgp.py:793:128: E501 line too long (496 > 127 characters)
./dpkt/bgp.py:794:128: E501 line too long (192 > 127 characters)
./dpkt/bgp.py:797:128: E501 line too long (396 > 127 characters)
./dpkt/bgp.py:798:128: E501 line too long (456 > 127 characters)
./dpkt/bgp.py:799:128: E501 line too long (364 > 127 characters)
./dpkt/bgp.py:800:128: E501 line too long (388 > 127 characters)
./dpkt/bgp.py:801:128: E501 line too long (504 > 127 characters)
./dpkt/bgp.py:854:24: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:855:26: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:856:23: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:857:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:863:24: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:864:26: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:865:23: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:866:31: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:994:128: E501 line too long (447 > 127 characters)
./dpkt/bgp.py:1005:32: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1006:34: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:1007:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1008:39: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1015:32: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1016:34: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:1017:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1018:39: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1030:32: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:1031:34: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1032:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1033:39: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1040:32: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:1041:34: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1042:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1043:39: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1065:1: E302 expected 2 blank lines, found 1
./dpkt/bgp.py:1067:128: E501 line too long (128 > 127 characters)
./dpkt/bgp.py:1068:128: E501 line too long (371 > 127 characters)
./dpkt/bgp.py:1087:32: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1088:34: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:1089:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1090:39: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1097:32: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1098:34: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:1099:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1100:39: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1112:32: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1113:34: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:1114:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1115:39: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1122:32: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:1123:34: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1124:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1125:39: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1132:32: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1133:34: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:1134:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1135:39: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1142:32: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:1143:34: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1144:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1145:39: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1152:32: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/bgp.py:1153:34: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1154:31: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1155:39: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./dpkt/bgp.py:1167:1: W391 blank line at end of file
./dpkt/smb.py:85:128: E501 line too long (132 > 127 characters)
./dpkt/smb.py:89:128: E501 line too long (154 > 127 characters)
./dpkt/smb.py:98:128: E501 line too long (150 > 127 characters)
./dpkt/netflow.py:42:9: E741 ambiguous variable name 'l'
./dpkt/netflow.py:71:40: E127 continuation line over-indented for visual indent
./dpkt/netflow.py:271:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/netflow.py:271:128: E501 line too long (3776 > 127 characters)
./dpkt/netflow.py:272:128: E501 line too long (5016 > 127 characters)
./dpkt/__init__.py:14:1: E303 too many blank lines (3)
./dpkt/__init__.py:14:1: F403 'from .dpkt import *' used; unable to detect undefined names
./dpkt/__init__.py:14:1: F401 '.dpkt.*' imported but unused
./dpkt/__init__.py:16:1: F401 '.ah' imported but unused
./dpkt/__init__.py:17:1: F401 '.aoe' imported but unused
./dpkt/__init__.py:18:1: F401 '.aim' imported but unused
./dpkt/__init__.py:19:1: F401 '.arp' imported but unused
./dpkt/__init__.py:20:1: F401 '.asn1' imported but unused
./dpkt/__init__.py:21:1: F401 '.bgp' imported but unused
./dpkt/__init__.py:22:1: F401 '.cdp' imported but unused
./dpkt/__init__.py:23:1: F401 '.dhcp' imported but unused
./dpkt/__init__.py:24:1: F401 '.diameter' imported but unused
./dpkt/__init__.py:25:1: F401 '.dns' imported but unused
./dpkt/__init__.py:26:1: F401 '.dtp' imported but unused
./dpkt/__init__.py:27:1: F401 '.esp' imported but unused
./dpkt/__init__.py:28:1: F401 '.ethernet' imported but unused
./dpkt/__init__.py:29:1: F401 '.gre' imported but unused
./dpkt/__init__.py:30:1: F401 '.gzip' imported but unused
./dpkt/__init__.py:31:1: F401 '.h225' imported but unused
./dpkt/__init__.py:32:1: F401 '.hsrp' imported but unused
./dpkt/__init__.py:33:1: F401 '.http' imported but unused
./dpkt/__init__.py:34:1: F401 '.http2' imported but unused
./dpkt/__init__.py:35:1: F401 '.icmp' imported but unused
./dpkt/__init__.py:36:1: F401 '.icmp6' imported but unused
./dpkt/__init__.py:37:1: F401 '.ieee80211' imported but unused
./dpkt/__init__.py:38:1: F401 '.igmp' imported but unused
./dpkt/__init__.py:39:1: F401 '.ip' imported but unused
./dpkt/__init__.py:40:1: F401 '.ip6' imported but unused
./dpkt/__init__.py:41:1: F401 '.ipx' imported but unused
./dpkt/__init__.py:42:1: F401 '.llc' imported but unused
./dpkt/__init__.py:43:1: F401 '.loopback' imported but unused
./dpkt/__init__.py:44:1: F401 '.mrt' imported but unused
./dpkt/__init__.py:45:1: F401 '.netbios' imported but unused
./dpkt/__init__.py:46:1: F401 '.netflow' imported but unused
./dpkt/__init__.py:47:1: F401 '.ntp' imported but unused
./dpkt/__init__.py:48:1: F401 '.ospf' imported but unused
./dpkt/__init__.py:49:1: F401 '.pcap' imported but unused
./dpkt/__init__.py:50:1: F401 '.pcapng' imported but unused
./dpkt/__init__.py:51:1: F401 '.pim' imported but unused
./dpkt/__init__.py:52:1: F401 '.pmap' imported but unused
./dpkt/__init__.py:53:1: F401 '.ppp' imported but unused
./dpkt/__init__.py:54:1: F401 '.pppoe' imported but unused
./dpkt/__init__.py:55:1: F401 '.qq' imported but unused
./dpkt/__init__.py:56:1: F401 '.radiotap' imported but unused
./dpkt/__init__.py:57:1: F401 '.radius' imported but unused
./dpkt/__init__.py:58:1: F401 '.rfb' imported but unused
./dpkt/__init__.py:59:1: F401 '.rip' imported but unused
./dpkt/__init__.py:60:1: F401 '.rpc' imported but unused
./dpkt/__init__.py:61:1: F401 '.rtp' imported but unused
./dpkt/__init__.py:62:1: F401 '.rx' imported but unused
./dpkt/__init__.py:63:1: F401 '.sccp' imported but unused
./dpkt/__init__.py:64:1: F401 '.sctp' imported but unused
./dpkt/__init__.py:65:1: F401 '.sip' imported but unused
./dpkt/__init__.py:66:1: F401 '.sll' imported but unused
./dpkt/__init__.py:67:1: F401 '.smb' imported but unused
./dpkt/__init__.py:68:1: F401 '.ssl' imported but unused
./dpkt/__init__.py:69:1: F401 '.stp' imported but unused
./dpkt/__init__.py:70:1: F401 '.stun' imported but unused
./dpkt/__init__.py:71:1: F401 '.tcp' imported but unused
./dpkt/__init__.py:72:1: F401 '.telnet' imported but unused
./dpkt/__init__.py:73:1: F401 '.tftp' imported but unused
./dpkt/__init__.py:74:1: F401 '.tns' imported but unused
./dpkt/__init__.py:75:1: F401 '.tpkt' imported but unused
./dpkt/__init__.py:76:1: F401 '.udp' imported but unused
./dpkt/__init__.py:77:1: F401 '.vrrp' imported but unused
./dpkt/__init__.py:78:1: F401 '.yahoo' imported but unused
./dpkt/sccp.py:191:1: W293 blank line contains whitespace
./dpkt/sctp.py:50:9: E741 ambiguous variable name 'l'
./dpkt/sctp.py:61:9: E741 ambiguous variable name 'l'
./dpkt/sctp.py:82:128: E501 line too long (297 > 127 characters)
./dpkt/http2.py:25:29: E261 at least two spaces before inline comment
./dpkt/http2.py:26:22: E261 at least two spaces before inline comment
./dpkt/http2.py:116:1: E302 expected 2 blank lines, found 1
./dpkt/http2.py:137:1: E302 expected 2 blank lines, found 1
./dpkt/http2.py:168:1: E302 expected 2 blank lines, found 1
./dpkt/http2.py:178:1: E302 expected 2 blank lines, found 1
./dpkt/http2.py:194:1: E302 expected 2 blank lines, found 1
./dpkt/http2.py:204:1: E302 expected 2 blank lines, found 1
./dpkt/http2.py:216:1: E302 expected 2 blank lines, found 1
./dpkt/http2.py:232:1: E302 expected 2 blank lines, found 1
./dpkt/http2.py:245:1: E302 expected 2 blank lines, found 1
./dpkt/http2.py:256:1: E302 expected 2 blank lines, found 1
./dpkt/http2.py:270:1: E302 expected 2 blank lines, found 1
./dpkt/http2.py:282:1: E302 expected 2 blank lines, found 1
./dpkt/http2.py:373:68: E261 at least two spaces before inline comment
./dpkt/http2.py:374:66: E261 at least two spaces before inline comment
./dpkt/http2.py:375:70: E203 whitespace before ','
./dpkt/http2.py:375:70: E261 at least two spaces before inline comment
./dpkt/http2.py:380:65: E261 at least two spaces before inline comment
./dpkt/http2.py:380:66: E262 inline comment should start with '# '
./dpkt/http2.py:381:63: E261 at least two spaces before inline comment
./dpkt/http2.py:382:67: E261 at least two spaces before inline comment
./dpkt/http2.py:383:61: E261 at least two spaces before inline comment
./dpkt/http2.py:384:63: E261 at least two spaces before inline comment
./dpkt/http2.py:385:69: E203 whitespace before ','
./dpkt/http2.py:385:69: E261 at least two spaces before inline comment
./dpkt/http2.py:397:68: E261 at least two spaces before inline comment
./dpkt/http2.py:397:69: E262 inline comment should start with '# '
./dpkt/http2.py:398:66: E261 at least two spaces before inline comment
./dpkt/http2.py:399:70: E203 whitespace before ','
./dpkt/http2.py:399:70: E261 at least two spaces before inline comment
./dpkt/http2.py:412:50: E261 at least two spaces before inline comment
./dpkt/http2.py:413:48: E261 at least two spaces before inline comment
./dpkt/http2.py:414:52: E261 at least two spaces before inline comment
./dpkt/http2.py:415:44: E203 whitespace before ','
./dpkt/http2.py:415:44: E261 at least two spaces before inline comment
./dpkt/http2.py:420:13: F841 local variable 'x' is assigned to but never used
./dpkt/http2.py:420:50: E261 at least two spaces before inline comment
./dpkt/http2.py:421:48: E261 at least two spaces before inline comment
./dpkt/http2.py:422:52: E261 at least two spaces before inline comment
./dpkt/http2.py:424:44: E203 whitespace before ','
./dpkt/http2.py:424:44: E261 at least two spaces before inline comment
./dpkt/http2.py:429:61: E261 at least two spaces before inline comment
./dpkt/http2.py:430:59: E261 at least two spaces before inline comment
./dpkt/http2.py:431:63: E261 at least two spaces before inline comment
./dpkt/http2.py:432:61: E203 whitespace before ','
./dpkt/http2.py:432:61: E261 at least two spaces before inline comment
./dpkt/http2.py:442:66: E261 at least two spaces before inline comment
./dpkt/http2.py:443:64: E261 at least two spaces before inline comment
./dpkt/http2.py:444:68: E261 at least two spaces before inline comment
./dpkt/http2.py:445:70: E261 at least two spaces before inline comment
./dpkt/http2.py:446:66: E203 whitespace before ','
./dpkt/http2.py:446:66: E261 at least two spaces before inline comment
./dpkt/http2.py:454:55: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/http2.py:462:13: F841 local variable 'x' is assigned to but never used
./dpkt/http2.py:462:53: E261 at least two spaces before inline comment
./dpkt/http2.py:463:51: E261 at least two spaces before inline comment
./dpkt/http2.py:464:55: E261 at least two spaces before inline comment
./dpkt/http2.py:465:51: E203 whitespace before ','
./dpkt/http2.py:465:51: E261 at least two spaces before inline comment
./dpkt/http2.py:470:62: E261 at least two spaces before inline comment
./dpkt/http2.py:471:60: E261 at least two spaces before inline comment
./dpkt/http2.py:472:64: E261 at least two spaces before inline comment
./dpkt/http2.py:473:64: E261 at least two spaces before inline comment
./dpkt/http2.py:474:58: E203 whitespace before ','
./dpkt/http2.py:474:58: E261 at least two spaces before inline comment
./dpkt/http2.py:482:51: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/http2.py:489:13: F841 local variable 'x' is assigned to but never used
./dpkt/http2.py:489:54: E261 at least two spaces before inline comment
./dpkt/http2.py:490:52: E261 at least two spaces before inline comment
./dpkt/http2.py:491:56: E261 at least two spaces before inline comment
./dpkt/http2.py:492:56: E261 at least two spaces before inline comment
./dpkt/http2.py:493:50: E261 at least two spaces before inline comment
./dpkt/http2.py:494:50: E203 whitespace before ','
./dpkt/http2.py:494:50: E261 at least two spaces before inline comment
./dpkt/http2.py:499:57: E261 at least two spaces before inline comment
./dpkt/http2.py:500:55: E261 at least two spaces before inline comment
./dpkt/http2.py:501:59: E261 at least two spaces before inline comment
./dpkt/http2.py:502:59: E203 whitespace before ','
./dpkt/http2.py:502:59: E261 at least two spaces before inline comment
./dpkt/http2.py:514:13: F841 local variable 'x' is assigned to but never used
./dpkt/http2.py:514:55: E261 at least two spaces before inline comment
./dpkt/http2.py:515:53: E261 at least two spaces before inline comment
./dpkt/http2.py:516:57: E261 at least two spaces before inline comment
./dpkt/http2.py:517:57: E261 at least two spaces before inline comment
./dpkt/http2.py:518:51: E203 whitespace before ','
./dpkt/http2.py:518:51: E261 at least two spaces before inline comment
./dpkt/http2.py:523:62: E261 at least two spaces before inline comment
./dpkt/http2.py:524:60: E261 at least two spaces before inline comment
./dpkt/http2.py:525:64: E261 at least two spaces before inline comment
./dpkt/http2.py:527:60: E261 at least two spaces before inline comment
./dpkt/http2.py:528:64: E261 at least two spaces before inline comment
./dpkt/http2.py:529:60: E261 at least two spaces before inline comment
./dpkt/http2.py:530:64: E203 whitespace before ','
./dpkt/http2.py:530:64: E261 at least two spaces before inline comment
./dpkt/http2.py:543:66: E261 at least two spaces before inline comment
./dpkt/http2.py:544:64: E261 at least two spaces before inline comment
./dpkt/http2.py:545:68: E203 whitespace before ','
./dpkt/http2.py:545:68: E261 at least two spaces before inline comment
./dpkt/http2.py:556:13: F841 local variable 'x' is assigned to but never used
./dpkt/http2.py:556:54: E261 at least two spaces before inline comment
./dpkt/http2.py:557:52: E261 at least two spaces before inline comment
./dpkt/http2.py:558:56: E261 at least two spaces before inline comment
./dpkt/http2.py:559:58: E203 whitespace before ','
./dpkt/http2.py:559:58: E261 at least two spaces before inline comment
./dpkt/http2.py:564:56: E261 at least two spaces before inline comment
./dpkt/http2.py:565:54: E261 at least two spaces before inline comment
./dpkt/http2.py:566:58: E261 at least two spaces before inline comment
./dpkt/http2.py:567:58: E261 at least two spaces before inline comment
./dpkt/http2.py:568:56: E203 whitespace before ','
./dpkt/http2.py:568:56: E261 at least two spaces before inline comment
./dpkt/http2.py:580:13: F841 local variable 'x' is assigned to but never used
./dpkt/http2.py:580:57: E261 at least two spaces before inline comment
./dpkt/http2.py:581:55: E261 at least two spaces before inline comment
./dpkt/http2.py:582:59: E261 at least two spaces before inline comment
./dpkt/http2.py:583:57: E203 whitespace before ','
./dpkt/http2.py:583:57: E261 at least two spaces before inline comment
./dpkt/http2.py:588:58: E261 at least two spaces before inline comment
./dpkt/http2.py:589:56: E261 at least two spaces before inline comment
./dpkt/http2.py:590:60: E261 at least two spaces before inline comment
./dpkt/http2.py:591:68: E203 whitespace before ','
./dpkt/http2.py:591:68: E261 at least two spaces before inline comment
./dpkt/http2.py:602:13: F841 local variable 'x' is assigned to but never used
./dpkt/http2.py:602:50: E261 at least two spaces before inline comment
./dpkt/http2.py:603:48: E261 at least two spaces before inline comment
./dpkt/http2.py:604:52: E261 at least two spaces before inline comment
./dpkt/http2.py:605:54: E203 whitespace before ','
./dpkt/http2.py:605:54: E261 at least two spaces before inline comment
./dpkt/http2.py:610:60: E261 at least two spaces before inline comment
./dpkt/http2.py:611:58: E261 at least two spaces before inline comment
./dpkt/http2.py:612:62: E261 at least two spaces before inline comment
./dpkt/http2.py:613:62: E261 at least two spaces before inline comment
./dpkt/http2.py:614:62: E261 at least two spaces before inline comment
./dpkt/http2.py:615:58: E203 whitespace before ','
./dpkt/http2.py:615:58: E261 at least two spaces before inline comment
./dpkt/http2.py:628:13: F841 local variable 'x' is assigned to but never used
./dpkt/http2.py:628:52: E261 at least two spaces before inline comment
./dpkt/http2.py:629:50: E261 at least two spaces before inline comment
./dpkt/http2.py:630:54: E261 at least two spaces before inline comment
./dpkt/http2.py:631:56: E203 whitespace before ','
./dpkt/http2.py:631:56: E261 at least two spaces before inline comment
./dpkt/http2.py:636:56: E261 at least two spaces before inline comment
./dpkt/http2.py:637:54: E261 at least two spaces before inline comment
./dpkt/http2.py:638:58: E261 at least two spaces before inline comment
./dpkt/http2.py:639:58: E203 whitespace before ','
./dpkt/http2.py:639:58: E261 at least two spaces before inline comment
./dpkt/http2.py:650:13: F841 local variable 'x' is assigned to but never used
./dpkt/http2.py:650:58: E261 at least two spaces before inline comment
./dpkt/http2.py:651:56: E261 at least two spaces before inline comment
./dpkt/http2.py:652:60: E261 at least two spaces before inline comment
./dpkt/http2.py:653:62: E203 whitespace before ','
./dpkt/http2.py:653:62: E261 at least two spaces before inline comment
./dpkt/http2.py:658:58: E261 at least two spaces before inline comment
./dpkt/http2.py:659:56: E261 at least two spaces before inline comment
./dpkt/http2.py:660:60: E261 at least two spaces before inline comment
./dpkt/http2.py:661:58: E203 whitespace before ','
./dpkt/http2.py:661:58: E261 at least two spaces before inline comment
./dpkt/http2.py:670:5: E303 too many blank lines (2)
./dpkt/http2.py:677:13: F841 local variable 'x' is assigned to but never used
./dpkt/http2.py:677:53: E261 at least two spaces before inline comment
./dpkt/http2.py:678:51: E261 at least two spaces before inline comment
./dpkt/http2.py:679:55: E203 whitespace before ','
./dpkt/http2.py:679:55: E261 at least two spaces before inline comment
./dpkt/http2.py:687:17: E128 continuation line under-indented for visual indent
./dpkt/http2.py:690:13: F841 local variable 'x' is assigned to but never used
./dpkt/http2.py:742:1: W391 blank line at end of file
./dpkt/loopback.py:40:1: E302 expected 2 blank lines, found 1
./dpkt/loopback.py:44:29: W291 trailing whitespace
./dpkt/loopback.py:50:1: E302 expected 2 blank lines, found 1
./dpkt/loopback.py:60:1: E302 expected 2 blank lines, found 1
./dpkt/loopback.py:62:128: E501 line too long (137 > 127 characters)
./dpkt/cdp.py:6:1: F401 'struct' imported but unused
./dpkt/cdp.py:47:55: W291 trailing whitespace
./dpkt/cdp.py:80:9: E301 expected 1 blank line, found 0
./dpkt/cdp.py:86:33: E262 inline comment should start with '# '
./dpkt/cdp.py:93:9: E741 ambiguous variable name 'l'
./dpkt/cdp.py:121:128: E501 line too long (134 > 127 characters)
./dpkt/cdp.py:123:28: W291 trailing whitespace
./dpkt/cdp.py:126:128: E501 line too long (134 > 127 characters)
./dpkt/cdp.py:131:28: W291 trailing whitespace
./dpkt/cdp.py:146:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/stun.py:58:8: E741 ambiguous variable name 'l'
./dpkt/stun.py:75:128: E501 line too long (139 > 127 characters)
./dpkt/ntp.py:76:128: E501 line too long (201 > 127 characters)
./dpkt/ntp.py:99:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/aim.py:24:1: W293 blank line contains whitespace
./dpkt/aim.py:49:1: W293 blank line contains whitespace
./dpkt/aim.py:61:12: E741 ambiguous variable name 'l'
./dpkt/aim.py:74:1: E302 expected 2 blank lines, found 1
./dpkt/aim.py:75:128: E501 line too long (452 > 127 characters)
./dpkt/aim.py:82:128: E501 line too long (440 > 127 characters)
./dpkt/aim.py:89:128: E501 line too long (409 > 127 characters)
./dpkt/aim.py:91:5: E265 block comment should start with '# '
./dpkt/aim.py:101:20: E741 ambiguous variable name 'l'
./dpkt/aim.py:103:128: E501 line too long (359 > 127 characters)
./dpkt/aim.py:117:9: F841 local variable 'flap' is assigned to but never used
./dpkt/qq.py:156:5: F601 dictionary key 34 repeated with different values
./dpkt/qq.py:157:5: F601 dictionary key 38 repeated with different values
./dpkt/qq.py:181:5: F601 dictionary key 34 repeated with different values
./dpkt/qq.py:183:5: F601 dictionary key 38 repeated with different values
./dpkt/aoecfg.py:30:128: E501 line too long (157 > 127 characters)
./dpkt/tcp.py:70:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/tcp.py:107:17: E741 ambiguous variable name 'l'
./dpkt/tcp.py:152:1: E302 expected 2 blank lines, found 1
./dpkt/tcp.py:160:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/ethernet.py:17:5: E301 expected 1 blank line, found 0
./dpkt/ethernet.py:18:30: F821 undefined name 'basestring'
./dpkt/ethernet.py:88:5: C901 'Ethernet._unpack_data' is too complex (12)
./dpkt/ethernet.py:134:5: C901 'Ethernet.unpack' is too complex (11)
./dpkt/ethernet.py:196:5: C901 'Ethernet.pack_hdr' is too complex (16)
./dpkt/ethernet.py:414:5: F401 '.ip' imported but unused
./dpkt/ethernet.py:676:5: F401 '.ip' imported but unused
./dpkt/ethernet.py:767:10: E128 continuation line under-indented for visual indent
./dpkt/ethernet.py:768:10: E128 continuation line under-indented for visual indent
./dpkt/ethernet.py:769:10: E128 continuation line under-indented for visual indent
./dpkt/ethernet.py:770:10: E128 continuation line under-indented for visual indent
./dpkt/ethernet.py:771:10: E128 continuation line under-indented for visual indent
./dpkt/ethernet.py:772:10: E128 continuation line under-indented for visual indent
./dpkt/ethernet.py:773:10: E128 continuation line under-indented for visual indent
./dpkt/ethernet.py:791:16: E251 unexpected spaces around keyword / parameter equals
./dpkt/ethernet.py:791:18: E251 unexpected spaces around keyword / parameter equals
./dpkt/ethernet.py:791:33: E251 unexpected spaces around keyword / parameter equals
./dpkt/ethernet.py:791:35: E251 unexpected spaces around keyword / parameter equals
./dpkt/ethernet.py:792:16: E251 unexpected spaces around keyword / parameter equals
./dpkt/ethernet.py:792:18: E251 unexpected spaces around keyword / parameter equals
./dpkt/ethernet.py:792:27: E251 unexpected spaces around keyword / parameter equals
./dpkt/ethernet.py:792:29: E251 unexpected spaces around keyword / parameter equals
./dpkt/rpc.py:107:46: E701 multiple statements on one line (colon)
./dpkt/rpc.py:108:21: E701 multiple statements on one line (colon)
./dpkt/rpc.py:114:57: E128 continuation line under-indented for visual indent
./dpkt/rpc.py:130:45: E701 multiple statements on one line (colon)
./dpkt/rpc.py:131:45: E701 multiple statements on one line (colon)
./dpkt/rpc.py:132:21: E701 multiple statements on one line (colon)
./dpkt/rpc.py:158:5: E741 ambiguous variable name 'l'
./dpkt/ip6.py:289:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/ip6.py:456:5: F841 local variable '_b' is assigned to but never used
./dpkt/ip.py:138:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/ip.py:365:1: E302 expected 2 blank lines, found 1
./dpkt/ip.py:374:1: E302 expected 2 blank lines, found 1
./dpkt/ip.py:375:128: E501 line too long (179 > 127 characters)
./dpkt/ip.py:383:128: E501 line too long (251 > 127 characters)
./dpkt/ip.py:392:128: E501 line too long (139 > 127 characters)
./dpkt/ip.py:399:18: E251 unexpected spaces around keyword / parameter equals
./dpkt/ip.py:399:20: E251 unexpected spaces around keyword / parameter equals
./dpkt/ip.py:400:18: E251 unexpected spaces around keyword / parameter equals
./dpkt/ip.py:400:20: E251 unexpected spaces around keyword / parameter equals
./dpkt/ip.py:400:41: E251 unexpected spaces around keyword / parameter equals
./dpkt/ip.py:400:43: E251 unexpected spaces around keyword / parameter equals
./dpkt/ip.py:411:128: E501 line too long (403 > 127 characters)
./dpkt/http.py:25:9: E741 ambiguous variable name 'l'
./dpkt/http.py:40:1: C901 'parse_body' is too complex (12)
./dpkt/http.py:43:9: E741 ambiguous variable name 'l'
./dpkt/http.py:164:9: E741 ambiguous variable name 'l'
./dpkt/http.py:210:9: E741 ambiguous variable name 'l'
./dpkt/http.py:254:128: E501 line too long (135 > 127 characters)
./dpkt/http.py:258:17: F841 local variable 'ret' is assigned to but never used
./dpkt/http.py:262:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:269:9: F841 local variable 'a' is assigned to but never used
./dpkt/http.py:273:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:274:128: E501 line too long (537 > 127 characters)
./dpkt/http.py:286:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:309:128: E501 line too long (1358 > 127 characters)
./dpkt/http.py:317:128: E501 line too long (190 > 127 characters)
./dpkt/http.py:385:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:405:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:453:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:457:5: F841 local variable 'r' is assigned to but never used
./dpkt/http.py:459:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:467:5: F841 local variable 'r' is assigned to but never used
./dpkt/http.py:469:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:478:5: F841 local variable 'r' is assigned to but never used
./dpkt/http.py:480:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:484:35: E502 the backslash is redundant between brackets
./dpkt/http.py:488:5: F841 local variable 'r' is assigned to but never used
./dpkt/http.py:490:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:491:5: F841 local variable 's' is assigned to but never used
./dpkt/http.py:496:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:499:5: F841 local variable 'r' is assigned to but never used
./dpkt/http.py:501:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:504:5: F841 local variable 'r' is assigned to but never used
./dpkt/http.py:506:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:509:5: F841 local variable 'r' is assigned to but never used
./dpkt/http.py:511:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:514:5: F841 local variable 'r' is assigned to but never used
./dpkt/http.py:516:1: E302 expected 2 blank lines, found 1
./dpkt/http.py:542:1: E302 expected 2 blank lines, found 1
./dpkt/mrt.py:69:9: E741 ambiguous variable name 'l'
./dpkt/rfb.py:35:1: W293 blank line contains whitespace
./dpkt/ipip.py:5:1: F401 '.ip.IP as IPIP' imported but unused
./dpkt/vrrp.py:50:9: E741 ambiguous variable name 'l'
./dpkt/vrrp.py:67:1: E302 expected 2 blank lines, found 1
./dpkt/radius.py:42:9: E741 ambiguous variable name 'l'
./dpkt/radius.py:50:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/tftp.py:44:13: E741 ambiguous variable name 'l'
./dpkt/aoeata.py:40:128: E501 line too long (203 > 127 characters)
./dpkt/rtp.py:98:1: E302 expected 2 blank lines, found 1
./dpkt/rtp.py:99:128: E501 line too long (706 > 127 characters)
./dpkt/rtp.py:110:128: E501 line too long (718 > 127 characters)
./dpkt/ssl.py:21:1: E302 expected 2 blank lines, found 1
./dpkt/ssl.py:55:5: E303 too many blank lines (2)
./dpkt/ssl.py:332:8: E111 indentation is not a multiple of four
./dpkt/ssl.py:333:12: E111 indentation is not a multiple of four
./dpkt/ssl.py:334:12: E111 indentation is not a multiple of four
./dpkt/ssl.py:335:12: E111 indentation is not a multiple of four
./dpkt/ssl.py:336:12: E111 indentation is not a multiple of four
./dpkt/ssl.py:337:12: E111 indentation is not a multiple of four
./dpkt/ssl.py:338:16: E111 indentation is not a multiple of four
./dpkt/ssl.py:339:16: E111 indentation is not a multiple of four
./dpkt/ssl.py:340:16: E111 indentation is not a multiple of four
./dpkt/ssl.py:341:8: E111 indentation is not a multiple of four
./dpkt/ssl.py:342:13: E117 over-indented
./dpkt/ssl.py:348:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/ssl.py:461:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/ssl.py:473:128: E501 line too long (1081 > 127 characters)
./dpkt/ssl.py:510:35: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/ssl.py:511:34: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/ssl.py:560:58: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/ssl.py:582:128: E501 line too long (187 > 127 characters)
./dpkt/ssl.py:585:128: E501 line too long (523 > 127 characters)
./dpkt/ssl.py:592:57: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/ssl.py:622:128: E501 line too long (178 > 127 characters)
./dpkt/ssl.py:626:57: E712 comparison to True should be 'if cond is True:' or 'if cond:'
./dpkt/ssl.py:647:128: E501 line too long (5822 > 127 characters)
./dpkt/ssl.py:660:32: E127 continuation line over-indented for visual indent
./dpkt/ssl.py:697:1: W391 blank line at end of file
./dpkt/netbios.py:15:5: E741 ambiguous variable name 'l'
./dpkt/netbios.py:27:5: E741 ambiguous variable name 'l'
./dpkt/netbios.py:116:17: E741 ambiguous variable name 'l'
./dpkt/pcapng.py:94:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:98:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:102:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:114:9: E265 block comment should start with '# '
./dpkt/pcapng.py:230:9: E265 block comment should start with '# '
./dpkt/pcapng.py:233:5: E301 expected 1 blank line, found 0
./dpkt/pcapng.py:266:9: E265 block comment should start with '# '
./dpkt/pcapng.py:304:9: E265 block comment should start with '# '
./dpkt/pcapng.py:305:9: E265 block comment should start with '# '
./dpkt/pcapng.py:377:44: E261 at least two spaces before inline comment
./dpkt/pcapng.py:507:5: C901 'Reader.__init__' is too complex (14)
./dpkt/pcapng.py:794:9: F841 local variable 'reader' is assigned to but never used
./dpkt/pcapng.py:798:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:856:128: E501 line too long (202 > 127 characters)
./dpkt/pcapng.py:891:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:902:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:908:128: E501 line too long (135 > 127 characters)
./dpkt/pcapng.py:932:17: F821 undefined name 'writer'
./dpkt/pcapng.py:972:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:977:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:979:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:984:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:986:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:992:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:994:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:998:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1000:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1010:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1013:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1020:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1023:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1030:128: E501 line too long (221 > 127 characters)
./dpkt/pcapng.py:1031:128: E501 line too long (223 > 127 characters)
./dpkt/pcapng.py:1035:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1038:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1039:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1040:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1041:21: F821 undefined name 'fobj'
./dpkt/pcapng.py:1047:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1050:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1053:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1056:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1059:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1061:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1062:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1063:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1068:21: F821 undefined name 'fobj'
./dpkt/pcapng.py:1071:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1073:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1074:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1075:5: F821 undefined name 'fobj'
./dpkt/pcapng.py:1080:21: F821 undefined name 'fobj'
./dpkt/pcapng.py:1083:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1093:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1133:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1143:5: F841 local variable 'reader' is assigned to but never used
./dpkt/pcapng.py:1146:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1152:9: F841 local variable 'writer' is assigned to but never used
./dpkt/pcapng.py:1152:25: F821 undefined name 'fobj'
./dpkt/pcapng.py:1157:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1162:21: F821 undefined name 'fobj'
./dpkt/pcapng.py:1166:5: E731 do not assign a lambda expression, use a def
./dpkt/pcapng.py:1174:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1183:9: F841 local variable 'writer' is assigned to but never used
./dpkt/pcapng.py:1183:25: F821 undefined name 'fobj'
./dpkt/pcapng.py:1190:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1199:9: F841 local variable 'writer' is assigned to but never used
./dpkt/pcapng.py:1199:25: F821 undefined name 'fobj'
./dpkt/pcapng.py:1206:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1211:5: E731 do not assign a lambda expression, use a def
./dpkt/pcapng.py:1212:5: F821 undefined name 'writer'
./dpkt/pcapng.py:1216:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1219:5: F821 undefined name 'writer'
./dpkt/pcapng.py:1222:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1225:5: F821 undefined name 'writer'
./dpkt/pcapng.py:1228:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1238:5: F821 undefined name 'writer'
./dpkt/pcapng.py:1241:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1249:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1258:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1276:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1288:1: E302 expected 2 blank lines, found 1
./dpkt/pcapng.py:1296:9: F841 local variable 'a' is assigned to but never used
./dpkt/ssl_ciphersuites.py:44:27: E261 at least two spaces before inline comment
./dpkt/ssl_ciphersuites.py:51:29: E261 at least two spaces before inline comment
./dpkt/ssl_ciphersuites.py:58:29: E261 at least two spaces before inline comment
./dpkt/ssl_ciphersuites.py:60:29: E261 at least two spaces before inline comment
./dpkt/ssl_ciphersuites.py:78:31: E261 at least two spaces before inline comment
./dpkt/ssl_ciphersuites.py:115:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/ssl_ciphersuites.py:118:9: E128 continuation line under-indented for visual indent
./dpkt/ssl_ciphersuites.py:121:9: E128 continuation line under-indented for visual indent
./dpkt/ssl_ciphersuites.py:123:9: E128 continuation line under-indented for visual indent
./dpkt/ssl_ciphersuites.py:134:9: E128 continuation line under-indented for visual indent
./dpkt/ssl_ciphersuites.py:173:13: E128 continuation line under-indented for visual indent
./dpkt/ssl_ciphersuites.py:175:13: E128 continuation line under-indented for visual indent
./dpkt/ssl_ciphersuites.py:178:13: E128 continuation line under-indented for visual indent
./dpkt/ssl_ciphersuites.py:180:13: E128 continuation line under-indented for visual indent
./dpkt/ssl_ciphersuites.py:522:9: E128 continuation line under-indented for visual indent
./dpkt/ssl_ciphersuites.py:524:9: E128 continuation line under-indented for visual indent
./dpkt/ssl_ciphersuites.py:526:9: E128 continuation line under-indented for visual indent
./dpkt/ssl_ciphersuites.py:548:1: E302 expected 2 blank lines, found 0
./dpkt/ssl_ciphersuites.py:555:1: E305 expected 2 blank lines after class or function definition, found 1
./dpkt/pim.py:48:14: E222 multiple spaces after operator
./dpkt/dhcp.py:149:9: E741 ambiguous variable name 'l'
./dpkt/dhcp.py:151:41: E228 missing whitespace around modulo operator
./dpkt/dhcp.py:159:9: E741 ambiguous variable name 'l'
./dpkt/dhcp.py:176:128: E501 line too long (1100 > 127 characters)
./dpkt/stp.py:69:128: E501 line too long (185 > 127 characters)
./dpkt/diameter.py:80:21: E127 continuation line over-indented for visual indent
./dpkt/diameter.py:83:21: E127 continuation line over-indented for visual indent
./dpkt/diameter.py:87:9: E741 ambiguous variable name 'l'
./dpkt/diameter.py:105:1: E302 expected 2 blank lines, found 1
./dpkt/diameter.py:139:21: E127 continuation line over-indented for visual indent
./dpkt/diameter.py:162:128: E501 line too long (169 > 127 characters)
./dpkt/diameter.py:163:128: E501 line too long (185 > 127 characters)
./dpkt/asn1.py:70:1: C901 'decode' is too complex (16)
./dpkt/asn1.py:90:9: E741 ambiguous variable name 'l'
./dpkt/asn1.py:92:28: E741 ambiguous variable name 'l'
./dpkt/asn1.py:95:14: E741 ambiguous variable name 'l'
./dpkt/asn1.py:98:17: E741 ambiguous variable name 'l'
./dpkt/asn1.py:100:17: E741 ambiguous variable name 'l'
./dpkt/asn1.py:102:17: E741 ambiguous variable name 'l'
./dpkt/asn1.py:105:17: E741 ambiguous variable name 'l'
./dpkt/asn1.py:117:16: E741 ambiguous variable name 'l'
./dpkt/asn1.py:119:18: E741 ambiguous variable name 'l'
./dpkt/asn1.py:121:18: E741 ambiguous variable name 'l'
./dpkt/asn1.py:123:18: E741 ambiguous variable name 'l'
./dpkt/asn1.py:125:18: E741 ambiguous variable name 'l'
./dpkt/asn1.py:141:128: E501 line too long (876 > 127 characters)
./dpkt/asn1.py:142:128: E501 line too long (976 > 127 characters)
./dpkt/asn1.py:144:1: E305 expected 2 blank lines after class or function definition, found 1
13    C901 'decode' is too complex (16)
10    E111 indentation is not a multiple of four
1     E117 over-indented
1     E122 continuation line missing indentation or outdented
1     E124 closing bracket does not match visual indentation
5     E127 continuation line over-indented for visual indent
20    E128 continuation line under-indented for visual indent
27    E203 whitespace before ','
3     E222 multiple spaces after operator
1     E225 missing whitespace around operator
1     E228 missing whitespace around modulo operator
26    E251 unexpected spaces around keyword / parameter equals
124   E261 at least two spaces before inline comment
3     E262 inline comment should start with '# '
6     E265 block comment should start with '# '
1     E266 too many leading '#' for block comment
3     E301 expected 1 blank line, found 0
139   E302 expected 2 blank lines, found 1
4     E303 too many blank lines (3)
18    E305 expected 2 blank lines after class or function definition, found 1
2     E401 multiple imports on one line
75    E501 line too long (452 > 127 characters)
4     E502 the backslash is redundant between brackets
12    E701 multiple statements on one line (colon)
59    E712 comparison to False should be 'if cond is False:' or 'if not cond:'
2     E731 do not assign a lambda expression, use a def
57    E741 ambiguous variable name 'l'
71    F401 'types' imported but unused
1     F403 'from .dpkt import *' used; unable to detect undefined names
4     F601 dictionary key 34 repeated with different values
39    F821 undefined name 'basestring'
31    F841 local variable 'flap' is assigned to but never used
9     W291 trailing whitespace
12    W293 blank line contains whitespace
6     W391 blank line at end of file
791
obormot commented 3 years ago

🤦

obormot commented 3 years ago

86 warnings remain after PR https://github.com/kbandla/dpkt/pull/521 merge majority are about imports in dpkt/__init__.py, to be refactored in https://github.com/kbandla/dpkt/issues/501 13 are code complexity (C901)

./dpkt/http.py:40:1: C901 'parse_body' is too complex (12)
./dpkt/http.py:259:17: F841 local variable 'ret' is assigned to but never used
./dpkt/http.py:318:128: E501 line too long (1358 > 127 characters)
./dpkt/bgp.py:315:13: C901 'BGP.Update.Attribute.unpack' is too complex (14)
./dpkt/ipip.py:5:1: F401 '.ip.IP as IPIP' imported but unused
./dpkt/ieee80211.py:285:5: C901 'IEEE80211.unpack' is too complex (12)
./dpkt/pcapng.py:505:5: C901 'Reader.__init__' is too complex (14)
./dpkt/ethernet.py:82:5: C901 'Ethernet._unpack_data' is too complex (12)
./dpkt/ethernet.py:128:5: C901 'Ethernet.unpack' is too complex (11)
./dpkt/ethernet.py:190:5: C901 'Ethernet.pack_hdr' is too complex (16)
./dpkt/ethernet.py:408:5: F401 '.ip' imported but unused
./dpkt/ethernet.py:670:5: F401 '.ip' imported but unused
./dpkt/gzip.py:76:5: C901 'Gzip.unpack' is too complex (12)
./dpkt/asn1.py:69:1: C901 'decode' is too complex (16)
./dpkt/asn1.py:149:128: E501 line too long (976 > 127 characters)
./dpkt/compat.py:21:5: F401 'io.StringIO' imported but unused
./dpkt/compat.py:26:5: F401 'io.BytesIO' imported but unused
./dpkt/dns.py:255:9: C901 'DNS.RR.pack_rdata' is too complex (12)
./dpkt/dns.py:289:9: C901 'DNS.RR.unpack_rdata' is too complex (13)
./dpkt/__init__.py:12:1: F403 'from .dpkt import *' used; unable to detect undefined names
./dpkt/__init__.py:12:1: F401 '.dpkt.*' imported but unused
./dpkt/__init__.py:14:1: F401 '.ah' imported but unused
./dpkt/__init__.py:15:1: F401 '.aoe' imported but unused
./dpkt/__init__.py:16:1: F401 '.aim' imported but unused
./dpkt/__init__.py:17:1: F401 '.arp' imported but unused
./dpkt/__init__.py:18:1: F401 '.asn1' imported but unused
./dpkt/__init__.py:19:1: F401 '.bgp' imported but unused
./dpkt/__init__.py:20:1: F401 '.cdp' imported but unused
./dpkt/__init__.py:21:1: F401 '.dhcp' imported but unused
./dpkt/__init__.py:22:1: F401 '.diameter' imported but unused
./dpkt/__init__.py:23:1: F401 '.dns' imported but unused
./dpkt/__init__.py:24:1: F401 '.dtp' imported but unused
./dpkt/__init__.py:25:1: F401 '.esp' imported but unused
./dpkt/__init__.py:26:1: F401 '.ethernet' imported but unused
./dpkt/__init__.py:27:1: F401 '.gre' imported but unused
./dpkt/__init__.py:28:1: F401 '.gzip' imported but unused
./dpkt/__init__.py:29:1: F401 '.h225' imported but unused
./dpkt/__init__.py:30:1: F401 '.hsrp' imported but unused
./dpkt/__init__.py:31:1: F401 '.http' imported but unused
./dpkt/__init__.py:32:1: F401 '.http2' imported but unused
./dpkt/__init__.py:33:1: F401 '.icmp' imported but unused
./dpkt/__init__.py:34:1: F401 '.icmp6' imported but unused
./dpkt/__init__.py:35:1: F401 '.ieee80211' imported but unused
./dpkt/__init__.py:36:1: F401 '.igmp' imported but unused
./dpkt/__init__.py:37:1: F401 '.ip' imported but unused
./dpkt/__init__.py:38:1: F401 '.ip6' imported but unused
./dpkt/__init__.py:39:1: F401 '.ipx' imported but unused
./dpkt/__init__.py:40:1: F401 '.llc' imported but unused
./dpkt/__init__.py:41:1: F401 '.loopback' imported but unused
./dpkt/__init__.py:42:1: F401 '.mrt' imported but unused
./dpkt/__init__.py:43:1: F401 '.netbios' imported but unused
./dpkt/__init__.py:44:1: F401 '.netflow' imported but unused
./dpkt/__init__.py:45:1: F401 '.ntp' imported but unused
./dpkt/__init__.py:46:1: F401 '.ospf' imported but unused
./dpkt/__init__.py:47:1: F401 '.pcap' imported but unused
./dpkt/__init__.py:48:1: F401 '.pcapng' imported but unused
./dpkt/__init__.py:49:1: F401 '.pim' imported but unused
./dpkt/__init__.py:50:1: F401 '.pmap' imported but unused
./dpkt/__init__.py:51:1: F401 '.ppp' imported but unused
./dpkt/__init__.py:52:1: F401 '.pppoe' imported but unused
./dpkt/__init__.py:53:1: F401 '.qq' imported but unused
./dpkt/__init__.py:54:1: F401 '.radiotap' imported but unused
./dpkt/__init__.py:55:1: F401 '.radius' imported but unused
./dpkt/__init__.py:56:1: F401 '.rfb' imported but unused
./dpkt/__init__.py:57:1: F401 '.rip' imported but unused
./dpkt/__init__.py:58:1: F401 '.rpc' imported but unused
./dpkt/__init__.py:59:1: F401 '.rtp' imported but unused
./dpkt/__init__.py:60:1: F401 '.rx' imported but unused
./dpkt/__init__.py:61:1: F401 '.sccp' imported but unused
./dpkt/__init__.py:62:1: F401 '.sctp' imported but unused
./dpkt/__init__.py:63:1: F401 '.sip' imported but unused
./dpkt/__init__.py:64:1: F401 '.sll' imported but unused
./dpkt/__init__.py:65:1: F401 '.smb' imported but unused
./dpkt/__init__.py:66:1: F401 '.ssl' imported but unused
./dpkt/__init__.py:67:1: F401 '.stp' imported but unused
./dpkt/__init__.py:68:1: F401 '.stun' imported but unused
./dpkt/__init__.py:69:1: F401 '.tcp' imported but unused
./dpkt/__init__.py:70:1: F401 '.telnet' imported but unused
./dpkt/__init__.py:71:1: F401 '.tftp' imported but unused
./dpkt/__init__.py:72:1: F401 '.tns' imported but unused
./dpkt/__init__.py:73:1: F401 '.tpkt' imported but unused
./dpkt/__init__.py:74:1: F401 '.udp' imported but unused
./dpkt/__init__.py:75:1: F401 '.vrrp' imported but unused
./dpkt/__init__.py:76:1: F401 '.yahoo' imported but unused
./dpkt/telnet.py:35:1: C901 'strip_options' is too complex (11)
./examples/old/ping.py:33:5: C901 'Ping.main' is too complex (12)
13    C901 'decode' is too complex (16)
2     E501 line too long (976 > 127 characters)
69    F401 '.dpkt.*' imported but unused
1     F403 'from .dpkt import *' used; unable to detect undefined names
1     F841 local variable 'ret' is assigned to but never used
86
brifordwylie commented 3 years ago

@obormot looks good thanks for the effort on this, I think what's left over is acceptable for now, closing this ticket