-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
/* PR_START p--query-resolution-perf 02 */ Add an interface to overri…
…de pretty-print behavior.
- Loading branch information
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
metricflow-semantics/metricflow_semantics/mf_logging/pretty_formattable.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from __future__ import annotations | ||
|
||
from abc import ABC, abstractmethod | ||
from typing import Optional | ||
|
||
|
||
class MetricFlowPrettyFormattable(ABC): | ||
"""Changes behavior for pretty-formatting using `MetricFlowPrettyFormatter`. | ||
This interface is pending updates to allow for additional configuration and structured return types. | ||
""" | ||
|
||
@property | ||
@abstractmethod | ||
def pretty_format(self) -> Optional[str]: | ||
"""Return the pretty-formatted version of this object, or None if the default approach should be used.""" | ||
raise NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters