mirror of
https://github.com/servo/servo.git
synced 2025-10-02 01:29:15 +01:00
Fix remaining flake8 warnings
This commit is contained in:
parent
c953931621
commit
d01648d637
28 changed files with 328 additions and 310 deletions
|
@ -75,8 +75,8 @@ class ServoFormatter(base.BaseFormatter):
|
|||
def text_to_erase_display(self):
|
||||
if not self.interactive or not self.current_display:
|
||||
return ""
|
||||
return ((self.move_up + self.clear_eol) *
|
||||
self.current_display.count('\n'))
|
||||
return ((self.move_up + self.clear_eol)
|
||||
* self.current_display.count('\n'))
|
||||
|
||||
def generate_output(self, text=None, new_display=None, unexpected_in_test=None):
|
||||
if not self.interactive:
|
||||
|
|
|
@ -19,6 +19,7 @@ def wpt_path(*args):
|
|||
def servo_path(*args):
|
||||
return os.path.join(servo_root, *args)
|
||||
|
||||
|
||||
paths = {"include_manifest": wpt_path("include.ini"),
|
||||
"config": wpt_path("config.ini"),
|
||||
"ca-cert-path": wpt_path("web-platform-tests/tools/certs/cacert.pem"),
|
||||
|
@ -26,8 +27,8 @@ paths = {"include_manifest": wpt_path("include.ini"),
|
|||
"host-cert-path": wpt_path("web-platform-tests/tools/certs/web-platform.test.pem")}
|
||||
# Imports
|
||||
sys.path.append(wpt_path("web-platform-tests", "tools"))
|
||||
import localpaths # noqa: flake8
|
||||
from wptrunner import wptrunner, wptcommandline
|
||||
import localpaths # noqa: F401,E402
|
||||
from wptrunner import wptrunner, wptcommandline # noqa: E402
|
||||
|
||||
|
||||
def run_tests(**kwargs):
|
||||
|
@ -106,5 +107,6 @@ def main():
|
|||
kwargs = vars(parser.parse_args())
|
||||
return run_tests(**kwargs)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(0 if main() else 1)
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
import os
|
||||
import sys
|
||||
from wptrunner import wptcommandline
|
||||
from update import updatecommandline
|
||||
|
||||
here = os.path.split(__file__)[0]
|
||||
|
||||
|
@ -12,9 +13,6 @@ here = os.path.split(__file__)[0]
|
|||
def wpt_path(*args):
|
||||
return os.path.join(here, *args)
|
||||
|
||||
# Imports
|
||||
from update import updatecommandline
|
||||
|
||||
|
||||
def update_tests(**kwargs):
|
||||
import update
|
||||
|
@ -45,5 +43,6 @@ def main():
|
|||
kwargs = vars(parser.parse_args())
|
||||
return update_tests(**kwargs)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(0 if main() else 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue