style: limit line length to 79 characters

Limited the lengths of all lines to 79 characters (if possible).
Additionally, some other lines were breaked for consistence.
This commit is contained in:
jakob.scheid committed 2026-09-18 16:57:45 +02:00
1 parent 8930efc7e6
commit caa8e04047
25 files changed
+6726 -1071

No files matched your search

+30 -5
View File
@@ -59,9 +59,17 @@ class PythonDefinition:
Python identifier.
'''
def __init__(self, name: str, doc: Union[PythonDocstring, None], decorators: list[str]) -> None:
def __init__(
self,
name: str,
doc: Union[PythonDocstring, None],
decorators: list[str]
) -> None:
if keyword.iskeyword(name) or not name.isidentifier() or not name:
raise InvalidPythonIdentifierError('invalid identifier', identifier = name)
raise InvalidPythonIdentifierError(
'invalid identifier',
identifier = name
)
assert_that_is_instance(doc, (PythonDocstring, types.NoneType))
@@ -119,7 +127,14 @@ class PythonFunctionDefinition(PythonDefinition):
Python identifier.
'''
def __init__(self, name: str, args: list[PythonFunctionArgument], returns: Union[str, None], doc: Union[PythonDocstring, None], decorators: list[str]) -> None:
def __init__(
self,
name: str,
args: list[PythonFunctionArgument],
returns: Union[str, None],
doc: Union[PythonDocstring, None],
decorators: list[str]
) -> None:
super().__init__(name, doc, decorators)
self.args = args
self.returns = returns
@@ -189,7 +204,14 @@ class PythonClassDefinition(PythonDefinition):
Python identifier.
'''
def __init__(self, name: str, bases: list[str], doc: Union[PythonDocstring, None], decorators: list[str], body: list[PythonDefinition]) -> None:
def __init__(
self,
name: str,
bases: list[str],
doc: Union[PythonDocstring, None],
decorators: list[str],
body: list[PythonDefinition]
) -> None:
super().__init__(name, doc, decorators)
self.bases = bases
self.body = body
@@ -227,6 +249,9 @@ class PythonClassDefinition(PythonDefinition):
else PythonClassDefinition.from_node(expr)
for expr in node.body
if isinstance(expr, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef))
if isinstance(
expr,
(ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef)
)
]
)