style: reformat code with ruff

This commit is contained in:
Tim Grelka
2024-12-11 01:09:42 +01:00
parent 0b4ce5b8b8
commit 7ef19075ee
17 changed files with 132 additions and 126 deletions
+3 -3
View File
@@ -8,23 +8,23 @@ class NonbreakingSpaces(SpanToken):
Insert unbreakable space into span token (§ 3)
Identifies "§$number", "Abs.$number", "Klasse [A,E,N]" w/ and without space between.
"""
pattern = re.compile(r"(§|Abs\.|Klasse)\s?(\d|[NEA])")
def __init__(self, match_object):
self.first = match_object.group(1)
self.second = match_object.group(2)
class NonbreakingSpacesDots(SpanToken):
"""
Insert unbreakable space before and after "..." if there is a space
Identifies "..." with leading and/or trailing space
"""
pattern = re.compile(r"(\s?)(\.\.\.)(\s?)")
def __init__(self, match_object):
self.first = match_object.group(1)
self.second = match_object.group(2)
self.third = match_object.group(3)