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
|
||||
|
||||
import sys, os
|
||||
import os
|
||||
import sys
|
||||
from licenseck import check_license
|
||||
|
||||
err = 0
|
||||
|
||||
|
||||
def report_error_name_no(name, no, s):
|
||||
global err
|
||||
print("%s:%d: %s" % (name, no, s))
|
||||
err=1
|
||||
err = 1
|
||||
|
||||
|
||||
def do_license_check(name, contents):
|
||||
if not check_license(name, contents):
|
||||
report_error_name_no(name, 1, "incorrect license")
|
||||
|
||||
|
||||
exceptions = [
|
||||
"src/support", # Upstream
|
||||
"src/platform", # Upstream
|
||||
"src/compiler", # Upstream
|
||||
"src/components/main/dom/bindings/codegen", # Generated and upstream code combined with our own. Could use cleanup
|
||||
"src/components/script/dom/bindings/codegen", # Generated and upstream code combined with our own. Could use cleanup
|
||||
"src/test/wpt/web-platform-tests", # Upstream
|
||||
# Upstream
|
||||
"src/support",
|
||||
"src/platform",
|
||||
"src/compiler",
|
||||
"src/test/wpt/web-platform-tests",
|
||||
|
||||
# Generated and upstream code combined with our own. Could use cleanup
|
||||
"src/components/script/dom/bindings/codegen",
|
||||
]
|
||||
|
||||
|
||||
def should_check(name):
|
||||
if ".#" in name:
|
||||
return False
|
||||
|
@ -47,6 +54,7 @@ def should_check(name):
|
|||
return False
|
||||
return True
|
||||
|
||||
|
||||
file_names = []
|
||||
for root, dirs, files in os.walk(sys.argv[1]):
|
||||
for myfile in files:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue