Skip to content

Commit

Permalink
Use warnings.warn(DeprecationWarning) as type_extensions is not in th…
Browse files Browse the repository at this point in the history
…e DPF shipped Python
  • Loading branch information
PProfizi committed Feb 4, 2025
1 parent 5b02a6b commit ef7f729
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ansys/dpf/core/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
import warnings
import weakref

from typing_extensions import deprecated

from ansys.dpf import core
from ansys.dpf.core.mapping_types import map_types_to_python
from ansys.dpf.core.outputs import Output, _Outputs
Expand Down Expand Up @@ -218,7 +216,6 @@ def __str__(self):
docstr += "{:<5}{:<4}{:<20}\n".format(*line)
return docstr

@deprecated("Use explicit output-to-input connections.")
def connect(self, inpt):
"""Connect any input (an entity or an operator output) to any input pin of this operator.
Expand All @@ -234,6 +231,10 @@ def connect(self, inpt):
Input of the operator.
"""
warnings.warn(
message="Use explicit output-to-input connections.", category=DeprecationWarning
)

from pathlib import Path

corresponding_pins = []
Expand Down

0 comments on commit ef7f729

Please sign in to comment.