Skip to content

Commit b8f8420

Browse files
committed
Don't magically import the microgrid module in examples
There is very little gain in making the import of the `microgrid` module to happen automatically and it makes the `conftest.py` script not generic enough to be shared by different projects (which is something we eventually want to do). Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 3390a54 commit b8f8420

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/conftest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ def evaluate(self, example: Example) -> None | str:
125125
import_header.append(
126126
path_to_import_statement(Path(os.path.relpath(example.path)))
127127
)
128-
# Add microgrid as default import
129-
import_header.append("from frequenz.sdk import microgrid")
130128
imports_code = "\n".join(import_header)
131129

132130
# Dedent the code example

src/frequenz/sdk/timeseries/_periodic_feature_extractor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class PeriodicFeatureExtractor:
7979
8080
Example:
8181
```python
82+
from frequenz.sdk import microgrid
8283
from datetime import datetime, timedelta, timezone
8384
8485
moving_window = MovingWindow(

0 commit comments

Comments
 (0)