wake.printers.api
module
#
Printer
class
#
Bases: Visitor
Base class for printers.
Attributes:
Name | Type | Description |
---|---|---|
paths |
List[Path]
|
Paths the printer should operate on. May be empty if a user did not specify any paths, e.g. when running |
extra |
Dict[Any, Any]
|
Extra data set by the execution engine. |
Source code in wake/printers/api.py
visit_mode: Literal['paths', 'all']
property
#
Configurable visit mode of the printer. If set to paths
, the printer visit_
methods will be called only for the paths specified by the user.
If set to all
, the printer visit_
methods will be called for all paths. In this case, the printer should use the paths
attribute to decide what to print.
Returns:
Type | Description |
---|---|
Literal['paths', 'all']
|
Visit mode of the printer. |
print()
abstractmethod
#
Abstract method that must be implemented in every printer. This method is called after all visit_
methods have been called.