Skip to content

Commit 352e19c

Browse files
Update to work with newly-release pylint v2.16 (#193)
2 parents a0be058 + f2bf6a8 commit 352e19c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

noxfile.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def min_dependencies() -> List[str]:
6060
"""Extract the minimum dependencies from pyproject.toml.
6161
6262
Raises:
63-
Exception: If minimun dependencies are not properly
63+
RuntimeError: If minimun dependencies are not properly
6464
set in pyproject.toml.
6565
6666
Returns:
@@ -72,15 +72,15 @@ def min_dependencies() -> List[str]:
7272

7373
dependencies = data.get("project", {}).get("dependencies", {})
7474
if not dependencies:
75-
raise Exception(f"No dependencies found in file: {toml_file.name}")
75+
raise RuntimeError(f"No dependencies found in file: {toml_file.name}")
7676

7777
min_deps: List[str] = []
7878
for dep in dependencies:
7979
min_dep = dep.split(",")[0]
8080
if any(op in min_dep for op in (">=", "==")):
8181
min_deps.append(min_dep.replace(">=", "=="))
8282
else:
83-
raise Exception(f"Minimum requirement is not set: {dep}")
83+
raise RuntimeError(f"Minimum requirement is not set: {dep}")
8484
return min_deps
8585

8686

@@ -235,6 +235,9 @@ def pylint(session: nox.Session, install_deps: bool = True) -> None:
235235
"pylint",
236236
"--extension-pkg-whitelist=pydantic",
237237
*paths,
238+
## ignore deprecated paths that will be removed soon.
239+
"--ignore-paths=tests/data_ingestion,\ntests/utils/data_generation.py,\n"
240+
"tests/test_data_handling,\ntests/test_microgrid_data_no_unnecessary_computations.py",
238241
)
239242

240243

src/frequenz/sdk/actor/_resampling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async def _subscribe(self, request: ComponentMetricRequest) -> None:
8282

8383
async def sink_adapter(sample: Sample) -> None:
8484
if not await sender.send(sample):
85-
raise Exception(f"Error while sending with sender {sender}", sender)
85+
raise RuntimeError(f"Error while sending with sender {sender}", sender)
8686

8787
self._resampler.add_timeseries(request_channel_name, receiver, sink_adapter)
8888

0 commit comments

Comments
 (0)