10.12., 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 8cc1d9da authored by eckhart's avatar eckhart

- small adjustments

parent 39ea46fb
......@@ -105,7 +105,7 @@ def only_errors(messages: Iterable[Error], level: int = Error.ERROR) -> Iterator
return (err for err in messages if err.level >= level)
def linebreaks(text: Union[StringView, str]):
def linebreaks(text: Union[StringView, str]) -> List[int]:
"""
Returns a list of indices all line breaks in the text.
"""
......
......@@ -375,8 +375,7 @@ class Node(collections.abc.Sized):
Adds an error to this Node.
Parameters:
message(str): A string with the error message.abs
level(int): The error level (error or warning)
code(Hashable): An error code to identify the kind of error
code(int): An error code to identify the kind of error
"""
self._errors.append(Error(message, code))
self.error_flag = max(self.error_flag, self._errors[-1].code)
......@@ -430,11 +429,11 @@ class Node(collections.abc.Sized):
Args:
tab (str): The indentation string, e.g. '\t' or ' '
openF: (Node->str) A function that returns an opening
open_fn: (Node->str) A function that returns an opening
string (e.g. an XML-tag_name) for a given node
closeF: (Node->str) A function that returns a closeF
close_fn: (Node->str) A function that returns a closeF
string (e.g. an XML-tag_name) for a given node.
dataF: (str->str) A function that filters the data string
data_fn: (str->str) A function that filters the data string
before printing, e.g. to add quotation marks
Returns (str):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment