tools: python: update flake8 rules

* Tree-factor location of some *.py files for easy demarcation of
  areas to exclude.

PR-URL: https://github.com/nodejs/node/pull/25614
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
Refael Ackermann 2019-04-11 10:45:01 -04:00
parent 914d6c9ab8
commit 0befda6970
57 changed files with 9 additions and 13 deletions

View File

@ -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

View File

@ -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': [

View File

@ -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',
],

1
test/fixtures/wpt/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.py

View File

@ -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))

View File

@ -1,3 +0,0 @@
def main(request, response):
response.headers.set("Content-Type", "text/plain;charset=" + request.GET.first("label"))
response.content = "hello encoding"

View File

@ -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));