Skip to content

Commit 4fec594

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e10ccfc commit 4fec594

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

src/evotorch/operators/functional.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ def f(x: torch.Tensor) -> torch.Tensor:
132132
```
133133
"""
134134

135-
136135
from typing import Iterable, NamedTuple, Optional, Union
137136

138137
import torch

src/evotorch/tools/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
This namespace contains various utility functions, classes, and type aliases.
1717
"""
1818

19-
2019
__all__ = (
2120
"BatchableScalar",
2221
"BatchableVector",

tests/test_neuroevolution_net_parser.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,9 @@ def test_str_to_net_with_kwargs_and_spaces_and_comments():
4747

4848

4949
def test_str_to_net_with_kwargs_and_spaces_and_comments_and_newlines():
50-
net = str_to_net(
51-
"""Linear( in_features = 4 , out_features = 2 ) # comment
50+
net = str_to_net("""Linear( in_features = 4 , out_features = 2 ) # comment
5251
53-
"""
54-
)
52+
""")
5553
assert isinstance(net, torch.nn.Linear)
5654
assert net.in_features == 4
5755
assert net.out_features == 2
@@ -74,14 +72,12 @@ def test_str_to_net_more_complex():
7472

7573

7674
def test_str_to_net_more_complex_multiline():
77-
net = str_to_net(
78-
"""
75+
net = str_to_net("""
7976
Linear(8, 16)
8077
>> Tanh()
8178
>> Linear(16, 4, bias=False)
8279
>> ReLU()
83-
"""
84-
)
80+
""")
8581

8682
assert isinstance(net, MultiLayered)
8783
assert len(net) == 4

0 commit comments

Comments
 (0)