pyEDAA.OutputFilter

Summary

Doc-string:

documented

File

Expected

Covered

Uncovered

Coverage

__init__.py

32

4

28

12.5%

Overall (10 files)

1412

262

1150

18.6%

Packages

Package

Expected

Covered

Uncovered

Coverage

CLI

190

13

177

6.8%

Xilinx

1190

245

945

20.6%

Source

pyEDAA.OutputFilter/__init__.pydocumentedundocumentedignoredexcludednot counted
33"""An abstraction layer of EDA tool output filters."""
...
35
36__author__ =            "Patrick Lehmann"
37__email__ =             "Paebbels@gmail.com"
38__copyright__ =         "2021-2026, Electronic Design Automation Abstraction (EDA²)"
39__license__ =           "Apache License, Version 2.0"
40__version__ =           "0.17.0"
41__keywords__ =          ["cli", "abstraction layer", "eda", "filter", "classification"]
42__project_url__ =       "https://github.com/edaa-org/pyEDAA.OutputFilter"
43__documentation_url__ = "https://edaa-org.github.io/pyEDAA.OutputFilter"
44__issue_tracker_url__ = "https://GitHub.com/edaa-org/pyEDAA.OutputFilter/issues"
45
...
54
56@export
57class OutputFilterException(ExceptionBase):
58	"""Base-class for all pyEDAA.OutputFilter specific exceptions."""
59
61LineClassification =   TypeVar("LineClassification",   bound=Flag)
62LineProcessingAction = TypeVar("LineProcessingAction", bound=Flag)
63
64@export
65class Line(Generic[LineClassification, LineProcessingAction], metaclass=ExtendedType, slots=True):
66	"""
67	This class represents any line in a log file.
68
69	A line has a line number (:attr:`_lineNumber`), a message (:attr:`__message`) and a message kind (:attr:`__kind`). In
70	addition, all line objects in a log file form a doubly
71	linked list.
72	"""
73	_lineNumber:    int
74	_timestamp:     Nullable[datetime]
75	_document:      Document
76	_kind:          LineClassification
77	_action:        LineProcessingAction
78	_message:       str
79	_previousLine:  Nullable[Line]
80	_nextLine:      Nullable[Line]
81
82	def __init__(
83		self,
84		lineNumber:   int,
85		kind:         LineClassification,
86		action:       LineProcessingAction,
87		message:      str,
88		previousLine: Nullable[Line] = None
89	) -> None:
		...
102
103	@readonly
104	def LineNumber(self) -> int:
		...
106
107	@readonly
108	def Kind(self) -> LineClassification:
		...
110
111	@readonly
112	def Action(self) -> LineProcessingAction:
		...
114
115	@readonly
116	def Message(self) -> str:
		...
118
119	@property
120	def PreviousLine(self) -> Nullable[Line]:
		...
122
123	@PreviousLine.setter
124	def PreviousLine(self, line: Line) -> None:
		...
128
129	@readonly
130	def NextLine(self) -> Nullable[Line]:
		...
132
133	def StartsWith(self, prefix: Union[str, Tuple[str, ...]]):
		...
135
136	def Partition(self, separator: str) -> Tuple[str, str, str]:
		...
138
139	def GetIterator(
140		self,
141		stopPredicate: Nullable[Callable[[Line], bool]] = None,
142		*,
143		reverse:   bool = False,
144		inclusive: bool = True,
145		maxLines:  Nullable[int] = None,
146	) -> Generator[Line, None, None]:
147		"""
148		Iterate consecutive lines starting from next line towards the end of the log.
149
150		If the order is reversed, iterate starting at the previous line towards the beginning of the log. The iteration ends
151		either at the bounds of the log, by specifying a stop predicate or a maximum number of lines to return. When stopped
152		this line is usually included in the iteration, but can be excluded.
153
154		:param stopPredicate: Optional, a callable receiving a :class:`Line` and returning ``True`` when iteration should
155		                      stop at that line.
156		:param reverse:       Optional, reverse the iteration from previous line to the beginning of the log.
157		:param inclusive:     Optional, when ``True`` the line where ``stopPredicate`` or ``maxLines`` triggers, is
158		                      included in the iteration, otherwise it's excluded.
159		:param maxLines:      Optional, maximum number of lines to yield.
160 		:returns:             A generator yielding :class:`Line` in the requested direction, stopping at the log boundary,
161 		                      the predicate match, or the line limit — whichever comes first.
162		:raises TypeError:    When ``stopPredicate`` is not callable.
163		:raises ValueError:   When ``maxLines`` is not a positive integer.
164		"""
		...
250
251	def __getitem__(self, item: slice) -> str:
		...
253
254	def __eq__(self, other: Any):
		...
256
257	def __ne__(self, other: Any):
		...
259
260	def __str__(self) -> str:
		...
262
263	def __repr__(self) -> str:
		...
265
267@export
268class InfoMessage(metaclass=ExtendedType, mixin=True):
	...
270
272@export
273class WarningMessage(metaclass=ExtendedType, mixin=True):
	...
275
277@export
278class CriticalWarningMessage(metaclass=ExtendedType, mixin=True):
	...
280
282@export
283class ErrorMessage(metaclass=ExtendedType, mixin=True):
	...