Skip to content

Commit d6599ca

Browse files
committed
Exclude _formula_engine from type checking
This is to be able to merge the easy fixes until we have time to fix this package, as it is quite complicated. For this to work, we also need to install the package as editable for `the ci_checks_max` nox session, otherwise the exclusion rule doesn't work as it is not found in `src/`. We also take the opportunity to make all installs in nox editable, it is usually what we want while developing. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 428b9da commit d6599ca

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

noxfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def ci_checks_max(session: nox.Session) -> None:
140140
Args:
141141
session: the nox session.
142142
"""
143-
session.install(".[dev]")
143+
session.install("-e", ".[dev]")
144144

145145
formatting(session, False)
146146
mypy(session, False)
@@ -158,7 +158,7 @@ def formatting(session: nox.Session, install_deps: bool = True) -> None:
158158
install_deps: True if dependencies should be installed.
159159
"""
160160
if install_deps:
161-
session.install(".[format]")
161+
session.install("-e", ".[format]")
162162

163163
paths = _source_file_paths(session)
164164
session.run("black", "--check", *paths)
@@ -228,7 +228,7 @@ def docstrings(session: nox.Session, install_deps: bool = True) -> None:
228228
install_deps: True if dependencies should be installed.
229229
"""
230230
if install_deps:
231-
session.install(".[docs-lint]")
231+
session.install("-e", ".[docs-lint]")
232232

233233
paths = _source_file_paths(session)
234234
session.run("pydocstyle", *paths)

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ src_paths = ["src", "examples", "tests"]
136136
asyncio_mode = "auto"
137137
required_plugins = [ "pytest-asyncio", "pytest-mock" ]
138138

139+
[tool.mypy]
140+
# This is a temporary hack, for details see:
141+
# * https://github.com/frequenz-floss/frequenz-sdk-python/pull/219
142+
# * https://github.com/frequenz-floss/frequenz-sdk-python/issues/226
143+
exclude = ["src/frequenz/sdk/timeseries/_formula_engine/"]
144+
139145
[[tool.mypy.overrides]]
140146
module = [
141147
"grpc.aio",

0 commit comments

Comments
 (0)