Skip to content

Commit

Permalink
Make mypy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed Nov 27, 2024
1 parent 4344c12 commit 9356ced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/ribasim/ribasim/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def write(self, filepath: str | PathLike[str]) -> Path:
if self.use_validation:
self._validate_model()

if self.edge.df.subnetwork_id.notna().any():
if self.edge.df is not None and self.edge.df["subnetwork_id"].notna().any():
warnings.warn(

Check warning on line 311 in python/ribasim/ribasim/model.py

View check run for this annotation

Codecov / codecov/patch

python/ribasim/ribasim/model.py#L311

Added line #L311 was not covered by tests
"Sources for allocation are automatically inferred and no longer have to be specified in the `Edge` table.",
DeprecationWarning,
Expand Down

0 comments on commit 9356ced

Please sign in to comment.