Skip to content

Commit 1363497

Browse files
committed
improve message
1 parent c482b8d commit 1363497

File tree

1 file changed

+4
-3
lines changed
  • src/power_grid_model_ds/_core/model/graphs/models

1 file changed

+4
-3
lines changed

src/power_grid_model_ds/_core/model/graphs/models/base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,11 @@ def get_components(self, substation_nodes: list[int] | None = None) -> list[list
254254
warnings.warn(
255255
message="""
256256
get_components: substation_nodes argument is deprecated and will be removed in a future release.
257-
Replace with the tmp_remove_nodes context manager.
257+
The functionality is still available by using the `tmp_remove_nodes` context manager.
258258
259-
with graph.tmp_remove_nodes(substation_nodes):
260-
compontents = graph.get_components()
259+
Example:
260+
>>> with graph.tmp_remove_nodes(substation_nodes):
261+
>>> compontents = graph.get_components()
261262
""",
262263
category=DeprecationWarning,
263264
stacklevel=2,

0 commit comments

Comments
 (0)