diff --git a/pyproject.toml b/pyproject.toml index 650099bc..84418dd2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,6 +84,8 @@ select = [ "I", # flake8-comprehensions "C4", + # eradicate + "ERA", ] ignore = ["E501"] #ignore line-length violations diff --git a/tests/unit/nodes/test_composite.py b/tests/unit/nodes/test_composite.py index af4ed8ee..ba0b9299 100644 --- a/tests/unit/nodes/test_composite.py +++ b/tests/unit/nodes/test_composite.py @@ -22,10 +22,6 @@ class AComposite(Composite): def __init__(self, label): super().__init__(label=label) - def _get_linking_channel(self, child_reference_channel, composite_io_key): - pass # Shouldn't even be abstract honestly - # return child_reference_channel # IO by reference - @property def inputs(self) -> Inputs: # Dynamic IO reflecting current children diff --git a/tests/unit/nodes/test_for_loop.py b/tests/unit/nodes/test_for_loop.py index 00d62d1c..2efb5e65 100644 --- a/tests/unit/nodes/test_for_loop.py +++ b/tests/unit/nodes/test_for_loop.py @@ -354,7 +354,7 @@ def FiveApart( d=[9, 10, 11], e="e", output_column_map={ - # "a": "out_a", + # Note the absence of the "a" conflicting entry "b": "out_b", "c": "out_c", "d": "out_d", diff --git a/tests/unit/nodes/test_function.py b/tests/unit/nodes/test_function.py index 3ea0af3c..62e02ccc 100644 --- a/tests/unit/nodes/test_function.py +++ b/tests/unit/nodes/test_function.py @@ -136,8 +136,8 @@ def test_label_choices(self): self.subTest("Fail on multiple return values"), self.assertRaises(ValueError), ): - # Can't automatically parse output labels from a function with multiple - # return expressions + # Can't automatically parse output labels from a function with + # multiple return expressions function_node(multiple_branches) with self.subTest("Override output label scraping"): diff --git a/tests/unit/nodes/test_macro.py b/tests/unit/nodes/test_macro.py index 6b9fc605..fb402fda 100644 --- a/tests/unit/nodes/test_macro.py +++ b/tests/unit/nodes/test_macro.py @@ -245,11 +245,11 @@ def test_with_executor(self): returned_nodes.one, msg="Executing in a parallel process should be returning new instances", ) - # self.assertIs( - # returned_nodes.one, - # macro.nodes.one, - # msg="Returned nodes should be taken as children" - # ) # You can't do this, result.result() is returning new instances each call + self.assertIs( + returned_nodes.one, + macro.one, + msg="Returned nodes should be taken as children", + ) self.assertIs( macro, macro.one.parent, diff --git a/tests/unit/test_type_hinting.py b/tests/unit/test_type_hinting.py index 76f84bc6..ad4130b5 100644 --- a/tests/unit/test_type_hinting.py +++ b/tests/unit/test_type_hinting.py @@ -27,9 +27,6 @@ def __call__(self): (typing.Literal[1, 2], 1, "baz"), (Foo, Foo(), Foo), (type[Bar], Bar, Bar()), - # (callable, Bar(), Foo()), # Misses the bad! - # Can't hint args and returns without typing.Callable anyhow, so that's - # what people should be using regardless (typing.Callable, Bar(), Foo()), (tuple[int, float], (1, 1.1), ("fo", 0)), (dict[str, int], {"a": 1}, {"a": "b"}),