@@ -116,7 +116,7 @@ def _validate_url_schemes(
116
116
except Exception as err :
117
117
raise ValueError ("Invalid YAML string" ) from err
118
118
if isinstance (output , str ):
119
- output = { k : None for k in output .split ("," )}
119
+ output = dict . fromkeys ( output .split ("," ))
120
120
if not isinstance (output , dict ):
121
121
raise ValueError ("Expecting a comma-delimited str or YAML dictionary" )
122
122
return output
@@ -278,7 +278,7 @@ def parse(self, inputstring: str, document: nodes.document) -> None:
278
278
for i , line in enumerate (inputstring .split ("\n " )):
279
279
if len (line ) > document .settings .line_length_limit :
280
280
error = document .reporter .error (
281
- f"Line { i + 1 } exceeds the line-length-limit:"
281
+ f"Line { i + 1 } exceeds the line-length-limit:"
282
282
f" { document .settings .line_length_limit } ."
283
283
)
284
284
document .append (error )
@@ -479,7 +479,7 @@ def visit_rubric_html(self, node):
479
479
So here we override the visit/depart methods to output the correct <h> element
480
480
"""
481
481
if "level" in node :
482
- self .body .append (self .starttag (node , f' h{ node [" level" ] } ' , "" , CLASS = "rubric" ))
482
+ self .body .append (self .starttag (node , f" h{ node [' level' ] } " , "" , CLASS = "rubric" ))
483
483
else :
484
484
self .body .append (self .starttag (node , "p" , "" , CLASS = "rubric" ))
485
485
@@ -490,7 +490,7 @@ def depart_rubric_html(self, node):
490
490
See explanation in `visit_rubric_html`
491
491
"""
492
492
if "level" in node :
493
- self .body .append (f' </h{ node [" level" ]} >\n ' )
493
+ self .body .append (f" </h{ node [' level' ]} >\n " )
494
494
else :
495
495
self .body .append ("</p>\n " )
496
496
0 commit comments