Skip to content

Commit b0650d9

Browse files
committed
Make serve consistently use double quotes
There's very few of these, so we should just change them to be consistent.
1 parent 5aac4e9 commit b0650d9

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

tools/serve/serve.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def check_exposure(self, request):
212212

213213
class HtmlWrapperHandler(WrapperHandler):
214214
global_type: ClassVar[Optional[str]] = None
215-
headers = [('Content-Type', 'text/html')]
215+
headers = [("Content-Type", "text/html")]
216216

217217
def check_exposure(self, request):
218218
if self.global_type is not None:
@@ -232,7 +232,7 @@ def _meta_replacement(self, key, value):
232232
return '<meta name="timeout" content="long">'
233233
if key == "title":
234234
value = value.replace("&", "&amp;").replace("<", "&lt;")
235-
return '<title>%s</title>' % value
235+
return "<title>%s</title>" % value
236236
return None
237237

238238
def _script_replacement(self, key, value):
@@ -560,7 +560,7 @@ class ShadowRealmInAudioWorkletHandler(HtmlWrapperHandler):
560560

561561

562562
class BaseWorkerHandler(WrapperHandler):
563-
headers = [('Content-Type', 'text/javascript')]
563+
headers = [("Content-Type", "text/javascript")]
564564

565565
def _meta_replacement(self, key, value):
566566
return None
@@ -738,7 +738,7 @@ def __init__(self, inject_script = None):
738738
self.extra = []
739739
self.inject_script_data = None
740740
if inject_script is not None:
741-
with open(inject_script, 'rb') as f:
741+
with open(inject_script, "rb") as f:
742742
self.inject_script_data = f.read()
743743

744744
self.mountpoint_routes = OrderedDict()
@@ -848,7 +848,7 @@ def start(self, init_func, host, port, paths, routes, bind_address, config, log_
848848
self.proc = self.mp_context.Process(target=self.create_daemon,
849849
args=(init_func, host, port, paths, routes, bind_address,
850850
config, log_handlers, dict(**os.environ)),
851-
name='%s on port %s' % (self.scheme, port),
851+
name="%s on port %s" % (self.scheme, port),
852852
kwargs=kwargs)
853853
self.proc.daemon = True
854854
self.proc.start()
@@ -1429,10 +1429,10 @@ def run(config_cls=ConfigBuilder, route_builder=None, mp_context=None, log_handl
14291429
if kwargs.get("alias_file"):
14301430
with open(kwargs["alias_file"]) as alias_file:
14311431
for line in alias_file:
1432-
alias, doc_root = (x.strip() for x in line.split(','))
1432+
alias, doc_root = (x.strip() for x in line.split(","))
14331433
config["aliases"].append({
1434-
'url-path': alias,
1435-
'local-dir': doc_root,
1434+
"url-path": alias,
1435+
"local-dir": doc_root,
14361436
})
14371437

14381438
if route_builder is None:

tools/serve/test_functional.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def target():
6161
"alternate_hosts": {"alt": "127.0.0.1"},
6262
"check_subdomains": False,
6363
}
64-
with open(tempfile_name, 'w') as handle:
64+
with open(tempfile_name, "w") as handle:
6565
json.dump(config, handle)
6666

6767
# The `logger` module from the wptserver package uses a singleton

tools/serve/wave.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def run(venv=None, **kwargs):
9090
else:
9191
raise Exception("Missing virtualenv for serve-wave.")
9292

93-
if kwargs['report'] is True:
93+
if kwargs["report"] is True:
9494
if not is_wptreport_installed():
9595
raise Exception("wptreport is not installed. Please install it from https://github.com/w3c/wptreport")
9696

0 commit comments

Comments
 (0)