Skip to content

Commit 1f2ff3f

Browse files
committed
remove deprecated fill_value
1 parent 4a635d5 commit 1f2ff3f

File tree

4 files changed

+0
-27
lines changed

4 files changed

+0
-27
lines changed

linopy/expressions.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -664,15 +664,6 @@ def ndim(self) -> int:
664664
def loc(self) -> LocIndexer:
665665
return LocIndexer(self)
666666

667-
@classmethod # type: ignore
668-
@property
669-
def fill_value(cls) -> dict[str, Any]:
670-
warn(
671-
"The `.fill_value` attribute is deprecated, use linopy.expressions.FILL_VALUE instead.",
672-
DeprecationWarning,
673-
)
674-
return cls._fill_value
675-
676667
@property
677668
def type(self) -> str:
678669
return "LinearExpression"

linopy/variables.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -755,18 +755,6 @@ def range(self) -> tuple[int, int]:
755755
"""
756756
return self.data.attrs["label_range"]
757757

758-
@classmethod # type: ignore
759-
@property
760-
def fill_value(cls) -> dict[str, Any]:
761-
"""
762-
Return the fill value of the variable.
763-
"""
764-
warn(
765-
"The `.fill_value` attribute is deprecated, use linopy.variables.FILL_VALUE instead.",
766-
DeprecationWarning,
767-
)
768-
return cls._fill_value
769-
770758
@property
771759
def mask(self) -> DataArray:
772760
"""

test/test_linear_expression.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ def test_repr(m: Model) -> None:
147147
def test_fill_value() -> None:
148148
isinstance(LinearExpression._fill_value, dict)
149149

150-
with pytest.warns(DeprecationWarning):
151-
LinearExpression.fill_value
152-
153150

154151
def test_linexpr_with_scalars(m: Model) -> None:
155152
expr = m.linexpr((10, "x"), (1, "y"))

test/test_variable.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ def test_variable_sum_warn_unknown_kwargs(x: linopy.Variable) -> None:
183183
def test_fill_value() -> None:
184184
isinstance(linopy.variables.Variable._fill_value, dict)
185185

186-
with pytest.warns(DeprecationWarning):
187-
linopy.variables.Variable.fill_value
188-
189186

190187
def test_variable_where(x: linopy.Variable) -> None:
191188
x = x.where([True] * 4 + [False] * 6)

0 commit comments

Comments
 (0)