mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Fix PEP8 violations in tidy.py.
This commit is contained in:
parent
65c61cde8b
commit
695fe12863
1 changed files with 16 additions and 8 deletions
|
@ -9,29 +9,36 @@
|
||||||
|
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import sys, os
|
import os
|
||||||
|
import sys
|
||||||
from licenseck import check_license
|
from licenseck import check_license
|
||||||
|
|
||||||
err = 0
|
err = 0
|
||||||
|
|
||||||
|
|
||||||
def report_error_name_no(name, no, s):
|
def report_error_name_no(name, no, s):
|
||||||
global err
|
global err
|
||||||
print("%s:%d: %s" % (name, no, s))
|
print("%s:%d: %s" % (name, no, s))
|
||||||
err=1
|
err = 1
|
||||||
|
|
||||||
|
|
||||||
def do_license_check(name, contents):
|
def do_license_check(name, contents):
|
||||||
if not check_license(name, contents):
|
if not check_license(name, contents):
|
||||||
report_error_name_no(name, 1, "incorrect license")
|
report_error_name_no(name, 1, "incorrect license")
|
||||||
|
|
||||||
|
|
||||||
exceptions = [
|
exceptions = [
|
||||||
"src/support", # Upstream
|
# Upstream
|
||||||
"src/platform", # Upstream
|
"src/support",
|
||||||
"src/compiler", # Upstream
|
"src/platform",
|
||||||
"src/components/main/dom/bindings/codegen", # Generated and upstream code combined with our own. Could use cleanup
|
"src/compiler",
|
||||||
"src/components/script/dom/bindings/codegen", # Generated and upstream code combined with our own. Could use cleanup
|
"src/test/wpt/web-platform-tests",
|
||||||
"src/test/wpt/web-platform-tests", # Upstream
|
|
||||||
|
# Generated and upstream code combined with our own. Could use cleanup
|
||||||
|
"src/components/script/dom/bindings/codegen",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def should_check(name):
|
def should_check(name):
|
||||||
if ".#" in name:
|
if ".#" in name:
|
||||||
return False
|
return False
|
||||||
|
@ -47,6 +54,7 @@ def should_check(name):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
file_names = []
|
file_names = []
|
||||||
for root, dirs, files in os.walk(sys.argv[1]):
|
for root, dirs, files in os.walk(sys.argv[1]):
|
||||||
for myfile in files:
|
for myfile in files:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue