Deprecate child classes of Node #122
Annotations
2 errors and 1 warning
/home/runner/work/oemof-network/oemof-network/src/oemof/network/network/nodes.py#L63
_deprecation_warning = (
"Usage of {} is deprecated. Use oemof.network.Node instead."
)
+
class Bus(Node):
def __init__(self, *args, **kwargs):
warnings.warn(
_deprecation_warning.format(type(self)),
FutureWarning,
|
/home/runner/work/oemof-network/oemof-network/tests/test_network_classes.py#L339
assert self.es.nodes[1] == n2
n3 = Node(label="<TF1>", inputs=[n1], outputs=[n2])
self.es.add(n3)
assert n3 in self.es.nodes
+
def test_deprecated_classes():
with pytest.warns(FutureWarning):
Bus()
with pytest.warns(FutureWarning):
Sink()
|
Run linters
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-python@v1, samuelmeuli/lint-action@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|