Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ test = [
"PyVisa-sim>=0.6.0",
"sphinx>=4.5.0", # sphinx extension tests
"types-jsonschema>=4.16.0",
"types-networkx >= 3.1", # Version should match the networkx requirment
"types-networkx >= 3.6.1.20260303", # minimum version required for correct edge_subgraph types
"types_requests>=0.1.8",
"types-tabulate>=0.1.0",
"types-tqdm>=4.64.6",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ traitlets==5.14.3
# nbsphinx
types-jsonschema==4.26.0.20260202
# via qcodes (pyproject.toml)
types-networkx==3.6.1.20260210
types-networkx==3.6.1.20260303
# via qcodes (pyproject.toml)
types-pytz==2025.2.0.20251108
# via pandas-stubs
Expand Down
10 changes: 3 additions & 7 deletions src/qcodes/dataset/descriptions/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from collections import defaultdict
from copy import deepcopy
from itertools import chain, product
from typing import TYPE_CHECKING, Any, Literal, cast
from typing import TYPE_CHECKING, Any, Literal

import networkx as nx
from typing_extensions import deprecated
Expand Down Expand Up @@ -150,9 +150,7 @@ def _dependency_subgraph(self) -> nx.DiGraph[str]:
for edge in self.graph.edges
if self.graph.edges[edge]["interdep_type"] == "depends_on"
]
# the type annotations does not currently encode that edge_subgraph of a DiGraph
# is a DiGraph
return cast("nx.DiGraph[str]", self.graph.edge_subgraph(depends_on_edges))
return self.graph.edge_subgraph(depends_on_edges)

@property
def _inference_subgraph(self) -> nx.DiGraph[str]:
Expand All @@ -161,9 +159,7 @@ def _inference_subgraph(self) -> nx.DiGraph[str]:
for edge in self.graph.edges
if self.graph.edges[edge]["interdep_type"] == "inferred_from"
]
# the type annotations does not currently encode that edge_subgraph of a DiGraph
# is a DiGraph
return cast("nx.DiGraph[str]", self.graph.edge_subgraph(inferred_from_edges))
return self.graph.edge_subgraph(inferred_from_edges)

def extend(
self,
Expand Down
Loading