Skip to content

Commit f93d05e

Browse files
authored
Merge pull request #7894 from microsoft/dependabot/pip/types-networkx-3.6.1.20260303
Bump types-networkx from 3.6.1.20260210 to 3.6.1.20260303
2 parents 1573414 + 4934f1e commit f93d05e

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ test = [
7979
"PyVisa-sim>=0.6.0",
8080
"sphinx>=4.5.0", # sphinx extension tests
8181
"types-jsonschema>=4.16.0",
82-
"types-networkx >= 3.1", # Version should match the networkx requirment
82+
"types-networkx >= 3.6.1.20260303", # minimum version required for correct edge_subgraph types
8383
"types_requests>=0.1.8",
8484
"types-tabulate>=0.1.0",
8585
"types-tqdm>=4.64.6",

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ traitlets==5.14.3
453453
# nbsphinx
454454
types-jsonschema==4.26.0.20260202
455455
# via qcodes (pyproject.toml)
456-
types-networkx==3.6.1.20260210
456+
types-networkx==3.6.1.20260303
457457
# via qcodes (pyproject.toml)
458458
types-pytz==2025.2.0.20251108
459459
# via pandas-stubs

src/qcodes/dataset/descriptions/dependencies.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from collections import defaultdict
1111
from copy import deepcopy
1212
from itertools import chain, product
13-
from typing import TYPE_CHECKING, Any, Literal, cast
13+
from typing import TYPE_CHECKING, Any, Literal
1414

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

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

168164
def extend(
169165
self,

0 commit comments

Comments
 (0)