Commit 26db571
authored
Replace absolute imports with relative imports (#604)
The issues with absolute imports were reported when running mypy
directly, as `.nox/mypy/bin/mypy --strict src/`.
E.g., the older version of `_distribution_algorithm.py` causes the
error:
```
$ .nox/mypy/bin/mypy --strict src/
src/frequenz/sdk/microgrid/_graph.py: error: Source file found twice under different module names: "sdk._internal._math" and "frequenz.sdk._internal._math"
src/frequenz/sdk/microgrid/_graph.py: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#mapping-file-paths-to-modules for more info
src/frequenz/sdk/microgrid/_graph.py: note: Common resolutions include: a) adding `__init__.py` somewhere, b) using `--explicit-package-bases` or adjusting MYPYPATH
Found 1 error in 1 file (errors prevented further checking
```File tree
3 files changed
+6
-8
lines changed- src/frequenz/sdk
- actor/power_distributing
- _distribution_algorithm
- timeseries/ev_charger_pool
3 files changed
+6
-8
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
0 commit comments