Skip to content

pyflakes finds a lot of issues in html5lib (some critical like the "undefined" ones at the bottom) #1

@gsnedders

Description

@gsnedders

From Google Code, issue #221, reported by @mo. This is a more recent run post python3 merge below.

$ pyflakes html5lib/
html5lib/__init__.py:16: 'parse' imported but unused
html5lib/__init__.py:16: 'HTMLParser' imported but unused
html5lib/__init__.py:16: 'parseFragment' imported but unused
html5lib/__init__.py:17: 'getTreeBuilder' imported but unused
html5lib/__init__.py:18: 'getTreeWalker' imported but unused
html5lib/__init__.py:19: 'serialize' imported but unused
html5lib/inputstream.py:6: 'types' imported but unused
html5lib/inputstream.py:110: local variable 'data' is assigned to but never used
html5lib/inputstream.py:293: 'sys' imported but unused
html5lib/tokenizer.py:11: 'entitiesWindows1252' imported but unused
html5lib/tokenizer.py:12: 'asciiLowercase' imported but unused
html5lib/tokenizer.py:801: redefinition of unused 'scriptDataDoubleEscapedDashState' from line 778
html5lib/utils.py:3: 'version_info' imported but unused
html5lib/html5parser.py:4: 'sys' imported but unused
html5lib/html5parser.py:17: 'formattingElements' imported but unused
html5lib/html5parser.py:18: 'tableInsertModeElements' imported but unused
html5lib/html5parser.py:19: 'voidElements' imported but unused
html5lib/html5parser.py:20: redefinition of unused 'spaceCharacters' from line 16
html5lib/html5parser.py:91: local variable 'e' is assigned to but never used
html5lib/html5parser.py:408: local variable 'element' is assigned to but never used
html5lib/html5parser.py:1405: local variable 'name' is assigned to but never used
html5lib/html5parser.py:1591: local variable 'node' is assigned to but never used
html5lib/tests/__init__.py:12: 'support' imported but unused
html5lib/tests/test_serializer.py:18: 'html5parser' imported but unused
html5lib/tests/test_serializer.py:175: local variable 'test_name' is assigned to but never used
html5lib/tests/test_parser2.py:5: 'support' imported but unused
html5lib/tests/test_parser2.py:37: local variable 'doc' is assigned to but never used
html5lib/tests/support.py:15: 'html5lib' imported but unused
html5lib/tests/support.py:16: 'html5parser' imported but unused
html5lib/tests/support.py:46: 'lxml' imported but unused
html5lib/tests/test_sanitizer.py:3: 'os' imported but unused
html5lib/tests/test_sanitizer.py:4: 'sys' imported but unused
html5lib/tests/test_sanitizer.py:5: 'unittest' imported but unused
html5lib/tests/test_stream.py:3: 'support' imported but unused
html5lib/tests/tokenizertotree.py:10: 'test_parser' imported but unused
html5lib/tests/test_tokenizer.py:5: 'sys' imported but unused
html5lib/tests/test_tokenizer.py:7: 'io' imported but unused
html5lib/tests/test_tokenizer.py:183: local variable 'testName' is assigned to but never used
html5lib/tests/test_tokenizer.py:187: local variable 'skip' is assigned to but never used
html5lib/tests/test_parser.py:6: 'io' imported but unused
html5lib/tests/test_parser.py:14: 'html5lib' imported but unused
html5lib/tests/test_parser.py:15: 'treebuilders' imported but unused
html5lib/tests/test_treewalkers.py:16: 'LintError' imported but unused
html5lib/tests/test_treewalkers.py:16: 'LintFilter' imported but unused
html5lib/tests/test_treewalkers.py:20: redefinition of unused 'COMMENT' from line 109
html5lib/tests/test_treewalkers.py:87: 'ElementTree' imported but unused
html5lib/tests/test_encoding.py:3: 're' imported but unused
html5lib/tests/test_encoding.py:30: local variable 't' is assigned to but never used
html5lib/tests/test_encoding.py:47: local variable 'test_name' is assigned to but never used
html5lib/tests/test_encoding.py:55: 'chardet' imported but unused
html5lib/treebuilders/__init__.py:37: 'sys' imported but unused
html5lib/treebuilders/dom.py:5: 're' imported but unused
html5lib/treebuilders/dom.py:9: 'ihatexml' imported but unused
html5lib/treebuilders/etree.py:210: local variable 'finalText' is assigned to but never used
html5lib/treebuilders/etree.py:274: local variable 'finalText' is assigned to but never used
html5lib/trie/datrie.py:3: 'chain' imported but unused
html5lib/serializer/htmlserializer.py:27: redefinition of unused 'entities' from line 14
html5lib/serializer/htmlserializer.py:231: local variable 'attributes' is assigned to but never used
html5lib/treewalkers/dom.py:9: 'voidElements' imported but unused
html5lib/treewalkers/simpletree.py:50: undefined name '_node'
html5lib/treewalkers/lxmletree.py:8: 'sys' imported but unused
html5lib/treewalkers/lxmletree.py:13: 'voidElements' imported but unused
html5lib/treewalkers/_base.py:98: undefined name 'NodeImplementedError'
html5lib/treewalkers/_base.py:157: local variable 'endTag' is assigned to but never used

$ pyflakes html5lib/ | grep undefined
html5lib/treewalkers/simpletree.py:50: undefined name '_node'
html5lib/treewalkers/_base.py:98: undefined name 'NodeImplementedError'
html5lib/treewalkers/etree.py:129: undefined name 'moduleFactoryFactory'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy