style: include new linter rules and fix files

This commit is contained in:
Tim Grelka
2025-07-03 17:23:46 +02:00
parent 433f4ba4ef
commit 09331b3a54
20 changed files with 64 additions and 56 deletions
-1
View File
@@ -1,7 +1,6 @@
import re
from mistletoe.block_token import BlockToken
from mistletoe.span_token import SpanToken
class BlockComment(BlockToken):
+4 -1
View File
@@ -172,7 +172,10 @@ class FiftyOhmHtmlRenderer(HtmlRenderer):
return f"{lookup[token.first]}{token.second}{lookup[token.third]}"
def render_references(self, token):
return f'<a href="{self.section_url}#ref_{token.first}" onclick="highlightRef(\'{token.first}\');">{self.ref_id}</a>'
return (
f'<a href="{self.section_url}#ref_{token.first}"'
f" onclick=\"highlightRef('{token.first}');\">{self.ref_id}</a>"
)
def render_question(self, token):
return self.question_renderer(token.question_number)
+2 -2
View File
@@ -87,7 +87,7 @@ class FiftyOhmLaTeXRenderer(LaTeXRenderer):
return rf"\{tagtype}{{{self.render_inner(token)}}}"
def render_halfwidth_spaces(self, token):
return f"{token.first}.\,{token.second}."
return rf"{token.first}.\,{token.second}."
def render_nonbreaking_spaces(self, token):
return f"{token.first}~{token.second}"
@@ -124,7 +124,7 @@ class FiftyOhmLaTeXRenderer(LaTeXRenderer):
align += alignment
table = f"\\begin{{DARCtabular}}{{{align}}}\n"
for row in token.children:
for j, cell in enumerate(row.children):
table += self.render_inner(cell)
+1 -1
View File
@@ -21,4 +21,4 @@ class Include(BlockToken):
return ident
def __init__(self, match):
self.ident = match
self.ident = match
+1 -1
View File
@@ -16,4 +16,4 @@ class Photo(SpanToken):
self.id = match_object.group(1)
self.ref = match_object.group(2)
self.text = match_object.group(3)
self.number = "TODO"
self.number = "TODO"
+1 -1
View File
@@ -16,4 +16,4 @@ class Picture(SpanToken):
self.id = match_object.group(1)
self.ref = match_object.group(2)
self.text = match_object.group(3)
self.number = "TODO"
self.number = "TODO"