diff --git a/.flake8 b/.flake8 index 859c4d3575d..07baf0a8a8a 100644 --- a/.flake8 +++ b/.flake8 @@ -1,3 +1,3 @@ [flake8] -exclude=.git,deps,lib,src,test/fixtures,tools/*_macros.py,tools/gyp,tools/inspector_protocol,tools/jinja2,tools/markupsafe,tools/pip,tools/v8_gypfiles/broken -select=E901,E999,F821,F822,F823 +exclude=.git,deps,lib,src,tools/gyp,tools/inspector_protocol,tools/pip,tools/v8_gypfiles/broken +select=E9,F82 diff --git a/node.gyp b/node.gyp index f23fd42908d..6e792c907b0 100644 --- a/node.gyp +++ b/node.gyp @@ -805,20 +805,20 @@ 'inputs': [ '<@(library_files)', 'config.gypi', - 'tools/check_macros.py' + 'tools/js2c_macros/check_macros.py' ], 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc', ], 'conditions': [ [ 'node_use_dtrace=="false" and node_use_etw=="false"', { - 'inputs': [ 'src/notrace_macros.py' ] + 'inputs': [ 'tools/js2c_macros/notrace_macros.py' ] }], [ 'node_debug_lib=="false"', { - 'inputs': [ 'tools/nodcheck_macros.py' ] + 'inputs': [ 'tools/js2c_macros/nodcheck_macros.py' ] }], [ 'node_debug_lib=="true"', { - 'inputs': [ 'tools/dcheck_macros.py' ] + 'inputs': [ 'tools/js2c_macros/dcheck_macros.py' ] }] ], 'action': [ diff --git a/src/inspector/node_inspector.gypi b/src/inspector/node_inspector.gypi index 2eabd9dd310..6ec85461dda 100644 --- a/src/inspector/node_inspector.gypi +++ b/src/inspector/node_inspector.gypi @@ -97,7 +97,7 @@ 'action': [ 'python', 'tools/inspector_protocol/code_generator.py', - '--jinja_dir', '<@(protocol_tool_path)/..', + '--jinja_dir', '<@(protocol_tool_path)', '--output_base', '<(SHARED_INTERMEDIATE_DIR)/src/', '--config', 'src/inspector/node_protocol_config.json', ], diff --git a/test/fixtures/wpt/.gitignore b/test/fixtures/wpt/.gitignore new file mode 100644 index 00000000000..f104652b68f --- /dev/null +++ b/test/fixtures/wpt/.gitignore @@ -0,0 +1 @@ +*.py diff --git a/test/fixtures/wpt/encoding/resources/single-byte-raw.py b/test/fixtures/wpt/encoding/resources/single-byte-raw.py deleted file mode 100644 index b4a6c90405e..00000000000 --- a/test/fixtures/wpt/encoding/resources/single-byte-raw.py +++ /dev/null @@ -1,3 +0,0 @@ -def main(request, response): - response.headers.set("Content-Type", "text/plain;charset=" + request.GET.first("label")) - response.content = "".join(chr(byte) for byte in xrange(255)) diff --git a/test/fixtures/wpt/encoding/resources/text-plain-charset.py b/test/fixtures/wpt/encoding/resources/text-plain-charset.py deleted file mode 100644 index a1c07e70189..00000000000 --- a/test/fixtures/wpt/encoding/resources/text-plain-charset.py +++ /dev/null @@ -1,3 +0,0 @@ -def main(request, response): - response.headers.set("Content-Type", "text/plain;charset=" + request.GET.first("label")) - response.content = "hello encoding" diff --git a/tools/jinja2/AUTHORS b/tools/inspector_protocol/jinja2/AUTHORS similarity index 100% rename from tools/jinja2/AUTHORS rename to tools/inspector_protocol/jinja2/AUTHORS diff --git a/tools/jinja2/Jinja2-2.10.tar.gz.md5 b/tools/inspector_protocol/jinja2/Jinja2-2.10.tar.gz.md5 similarity index 100% rename from tools/jinja2/Jinja2-2.10.tar.gz.md5 rename to tools/inspector_protocol/jinja2/Jinja2-2.10.tar.gz.md5 diff --git a/tools/jinja2/Jinja2-2.10.tar.gz.sha512 b/tools/inspector_protocol/jinja2/Jinja2-2.10.tar.gz.sha512 similarity index 100% rename from tools/jinja2/Jinja2-2.10.tar.gz.sha512 rename to tools/inspector_protocol/jinja2/Jinja2-2.10.tar.gz.sha512 diff --git a/tools/jinja2/LICENSE b/tools/inspector_protocol/jinja2/LICENSE similarity index 100% rename from tools/jinja2/LICENSE rename to tools/inspector_protocol/jinja2/LICENSE diff --git a/tools/jinja2/OWNERS b/tools/inspector_protocol/jinja2/OWNERS similarity index 100% rename from tools/jinja2/OWNERS rename to tools/inspector_protocol/jinja2/OWNERS diff --git a/tools/jinja2/README.chromium b/tools/inspector_protocol/jinja2/README.chromium similarity index 100% rename from tools/jinja2/README.chromium rename to tools/inspector_protocol/jinja2/README.chromium diff --git a/tools/jinja2/__init__.py b/tools/inspector_protocol/jinja2/__init__.py similarity index 100% rename from tools/jinja2/__init__.py rename to tools/inspector_protocol/jinja2/__init__.py diff --git a/tools/jinja2/_compat.py b/tools/inspector_protocol/jinja2/_compat.py similarity index 100% rename from tools/jinja2/_compat.py rename to tools/inspector_protocol/jinja2/_compat.py diff --git a/tools/jinja2/_identifier.py b/tools/inspector_protocol/jinja2/_identifier.py similarity index 100% rename from tools/jinja2/_identifier.py rename to tools/inspector_protocol/jinja2/_identifier.py diff --git a/tools/jinja2/asyncfilters.py b/tools/inspector_protocol/jinja2/asyncfilters.py similarity index 100% rename from tools/jinja2/asyncfilters.py rename to tools/inspector_protocol/jinja2/asyncfilters.py diff --git a/tools/jinja2/asyncsupport.py b/tools/inspector_protocol/jinja2/asyncsupport.py similarity index 100% rename from tools/jinja2/asyncsupport.py rename to tools/inspector_protocol/jinja2/asyncsupport.py diff --git a/tools/jinja2/bccache.py b/tools/inspector_protocol/jinja2/bccache.py similarity index 100% rename from tools/jinja2/bccache.py rename to tools/inspector_protocol/jinja2/bccache.py diff --git a/tools/jinja2/compiler.py b/tools/inspector_protocol/jinja2/compiler.py similarity index 100% rename from tools/jinja2/compiler.py rename to tools/inspector_protocol/jinja2/compiler.py diff --git a/tools/jinja2/constants.py b/tools/inspector_protocol/jinja2/constants.py similarity index 100% rename from tools/jinja2/constants.py rename to tools/inspector_protocol/jinja2/constants.py diff --git a/tools/jinja2/debug.py b/tools/inspector_protocol/jinja2/debug.py similarity index 100% rename from tools/jinja2/debug.py rename to tools/inspector_protocol/jinja2/debug.py diff --git a/tools/jinja2/defaults.py b/tools/inspector_protocol/jinja2/defaults.py similarity index 100% rename from tools/jinja2/defaults.py rename to tools/inspector_protocol/jinja2/defaults.py diff --git a/tools/jinja2/environment.py b/tools/inspector_protocol/jinja2/environment.py similarity index 100% rename from tools/jinja2/environment.py rename to tools/inspector_protocol/jinja2/environment.py diff --git a/tools/jinja2/exceptions.py b/tools/inspector_protocol/jinja2/exceptions.py similarity index 100% rename from tools/jinja2/exceptions.py rename to tools/inspector_protocol/jinja2/exceptions.py diff --git a/tools/jinja2/ext.py b/tools/inspector_protocol/jinja2/ext.py similarity index 100% rename from tools/jinja2/ext.py rename to tools/inspector_protocol/jinja2/ext.py diff --git a/tools/jinja2/filters.py b/tools/inspector_protocol/jinja2/filters.py similarity index 100% rename from tools/jinja2/filters.py rename to tools/inspector_protocol/jinja2/filters.py diff --git a/tools/jinja2/get_jinja2.sh b/tools/inspector_protocol/jinja2/get_jinja2.sh similarity index 100% rename from tools/jinja2/get_jinja2.sh rename to tools/inspector_protocol/jinja2/get_jinja2.sh diff --git a/tools/jinja2/idtracking.py b/tools/inspector_protocol/jinja2/idtracking.py similarity index 100% rename from tools/jinja2/idtracking.py rename to tools/inspector_protocol/jinja2/idtracking.py diff --git a/tools/jinja2/jinja2.gni b/tools/inspector_protocol/jinja2/jinja2.gni similarity index 100% rename from tools/jinja2/jinja2.gni rename to tools/inspector_protocol/jinja2/jinja2.gni diff --git a/tools/jinja2/lexer.py b/tools/inspector_protocol/jinja2/lexer.py similarity index 100% rename from tools/jinja2/lexer.py rename to tools/inspector_protocol/jinja2/lexer.py diff --git a/tools/jinja2/loaders.py b/tools/inspector_protocol/jinja2/loaders.py similarity index 100% rename from tools/jinja2/loaders.py rename to tools/inspector_protocol/jinja2/loaders.py diff --git a/tools/jinja2/meta.py b/tools/inspector_protocol/jinja2/meta.py similarity index 100% rename from tools/jinja2/meta.py rename to tools/inspector_protocol/jinja2/meta.py diff --git a/tools/jinja2/nativetypes.py b/tools/inspector_protocol/jinja2/nativetypes.py similarity index 100% rename from tools/jinja2/nativetypes.py rename to tools/inspector_protocol/jinja2/nativetypes.py diff --git a/tools/jinja2/nodes.py b/tools/inspector_protocol/jinja2/nodes.py similarity index 100% rename from tools/jinja2/nodes.py rename to tools/inspector_protocol/jinja2/nodes.py diff --git a/tools/jinja2/optimizer.py b/tools/inspector_protocol/jinja2/optimizer.py similarity index 100% rename from tools/jinja2/optimizer.py rename to tools/inspector_protocol/jinja2/optimizer.py diff --git a/tools/jinja2/parser.py b/tools/inspector_protocol/jinja2/parser.py similarity index 100% rename from tools/jinja2/parser.py rename to tools/inspector_protocol/jinja2/parser.py diff --git a/tools/jinja2/runtime.py b/tools/inspector_protocol/jinja2/runtime.py similarity index 100% rename from tools/jinja2/runtime.py rename to tools/inspector_protocol/jinja2/runtime.py diff --git a/tools/jinja2/sandbox.py b/tools/inspector_protocol/jinja2/sandbox.py similarity index 100% rename from tools/jinja2/sandbox.py rename to tools/inspector_protocol/jinja2/sandbox.py diff --git a/tools/jinja2/tests.py b/tools/inspector_protocol/jinja2/tests.py similarity index 100% rename from tools/jinja2/tests.py rename to tools/inspector_protocol/jinja2/tests.py diff --git a/tools/jinja2/utils.py b/tools/inspector_protocol/jinja2/utils.py similarity index 100% rename from tools/jinja2/utils.py rename to tools/inspector_protocol/jinja2/utils.py diff --git a/tools/jinja2/visitor.py b/tools/inspector_protocol/jinja2/visitor.py similarity index 100% rename from tools/jinja2/visitor.py rename to tools/inspector_protocol/jinja2/visitor.py diff --git a/tools/markupsafe/AUTHORS b/tools/inspector_protocol/markupsafe/AUTHORS similarity index 100% rename from tools/markupsafe/AUTHORS rename to tools/inspector_protocol/markupsafe/AUTHORS diff --git a/tools/markupsafe/LICENSE b/tools/inspector_protocol/markupsafe/LICENSE similarity index 100% rename from tools/markupsafe/LICENSE rename to tools/inspector_protocol/markupsafe/LICENSE diff --git a/tools/markupsafe/MarkupSafe-0.18.tar.gz.md5 b/tools/inspector_protocol/markupsafe/MarkupSafe-0.18.tar.gz.md5 similarity index 100% rename from tools/markupsafe/MarkupSafe-0.18.tar.gz.md5 rename to tools/inspector_protocol/markupsafe/MarkupSafe-0.18.tar.gz.md5 diff --git a/tools/markupsafe/MarkupSafe-0.18.tar.gz.sha512 b/tools/inspector_protocol/markupsafe/MarkupSafe-0.18.tar.gz.sha512 similarity index 100% rename from tools/markupsafe/MarkupSafe-0.18.tar.gz.sha512 rename to tools/inspector_protocol/markupsafe/MarkupSafe-0.18.tar.gz.sha512 diff --git a/tools/markupsafe/OWNERS b/tools/inspector_protocol/markupsafe/OWNERS similarity index 100% rename from tools/markupsafe/OWNERS rename to tools/inspector_protocol/markupsafe/OWNERS diff --git a/tools/markupsafe/README.chromium b/tools/inspector_protocol/markupsafe/README.chromium similarity index 100% rename from tools/markupsafe/README.chromium rename to tools/inspector_protocol/markupsafe/README.chromium diff --git a/tools/markupsafe/__init__.py b/tools/inspector_protocol/markupsafe/__init__.py similarity index 100% rename from tools/markupsafe/__init__.py rename to tools/inspector_protocol/markupsafe/__init__.py diff --git a/tools/markupsafe/_compat.py b/tools/inspector_protocol/markupsafe/_compat.py similarity index 100% rename from tools/markupsafe/_compat.py rename to tools/inspector_protocol/markupsafe/_compat.py diff --git a/tools/markupsafe/_constants.py b/tools/inspector_protocol/markupsafe/_constants.py similarity index 100% rename from tools/markupsafe/_constants.py rename to tools/inspector_protocol/markupsafe/_constants.py diff --git a/tools/markupsafe/_native.py b/tools/inspector_protocol/markupsafe/_native.py similarity index 100% rename from tools/markupsafe/_native.py rename to tools/inspector_protocol/markupsafe/_native.py diff --git a/tools/markupsafe/_speedups.c b/tools/inspector_protocol/markupsafe/_speedups.c similarity index 100% rename from tools/markupsafe/_speedups.c rename to tools/inspector_protocol/markupsafe/_speedups.c diff --git a/tools/markupsafe/get_markupsafe.sh b/tools/inspector_protocol/markupsafe/get_markupsafe.sh similarity index 100% rename from tools/markupsafe/get_markupsafe.sh rename to tools/inspector_protocol/markupsafe/get_markupsafe.sh diff --git a/tools/check_macros.py b/tools/js2c_macros/check_macros.py similarity index 95% rename from tools/check_macros.py rename to tools/js2c_macros/check_macros.py index 2baf0d7f419..f24d47c9ee4 100644 --- a/tools/check_macros.py +++ b/tools/js2c_macros/check_macros.py @@ -1,3 +1,4 @@ +# flake8: noqa macro CHECK(x) = do { if (!(x)) (process._rawDebug("CHECK: x == true"), process.abort()) } while (0); macro CHECK_EQ(a, b) = CHECK((a) === (b)); macro CHECK_GE(a, b) = CHECK((a) >= (b)); diff --git a/tools/dcheck_macros.py b/tools/js2c_macros/dcheck_macros.py similarity index 100% rename from tools/dcheck_macros.py rename to tools/js2c_macros/dcheck_macros.py diff --git a/tools/nodcheck_macros.py b/tools/js2c_macros/nodcheck_macros.py similarity index 100% rename from tools/nodcheck_macros.py rename to tools/js2c_macros/nodcheck_macros.py diff --git a/src/notrace_macros.py b/tools/js2c_macros/notrace_macros.py similarity index 100% rename from src/notrace_macros.py rename to tools/js2c_macros/notrace_macros.py