Skip to content

Commit f46fe7c

Browse files
committed
Update black formatting (latest library version)
1 parent 7ef2c13 commit f46fe7c

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

doc/scripts/generate_benchmark_plot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ def __str__(self):
2424

2525
def benchmark(fn: Callable, *args, num_iterations: int = 10, **kwargs) -> Benchmark:
2626
timer = Timer(
27-
"fn(*args, **kwargs)", globals={"fn": fn, "args": args, "kwargs": kwargs},
27+
"fn(*args, **kwargs)",
28+
globals={"fn": fn, "args": args, "kwargs": kwargs},
2829
)
2930
times = timer.repeat(number=1, repeat=num_iterations + 1)
3031
return Benchmark(np.mean(times[1:]).item(), np.std(times[1:]).item())

tests/test_functional.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ def test_fft_conv_functional(
5353
b0 = torch.randn(out_channels, requires_grad=True) if bias else None
5454
b1 = b0.detach().clone().requires_grad_() if bias else None
5555

56-
kwargs = dict(padding=padding, stride=stride, dilation=dilation, groups=groups,)
56+
kwargs = dict(
57+
padding=padding,
58+
stride=stride,
59+
dilation=dilation,
60+
groups=groups,
61+
)
5762

5863
y0 = fft_conv(signal, w0, bias=b0, **kwargs)
5964
y1 = torch_conv(signal, w1, bias=b1, **kwargs)
@@ -99,7 +104,12 @@ def test_fft_conv_backward_functional(
99104
b0 = torch.randn(out_channels, requires_grad=True) if bias else None
100105
b1 = b0.detach().clone().requires_grad_() if bias else None
101106

102-
kwargs = dict(padding=padding, stride=stride, dilation=dilation, groups=groups,)
107+
kwargs = dict(
108+
padding=padding,
109+
stride=stride,
110+
dilation=dilation,
111+
groups=groups,
112+
)
103113

104114
y0 = fft_conv(signal, w0, bias=b0, **kwargs)
105115
y1 = torch_conv(signal, w1, bias=b1, **kwargs)

tests/test_module.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ def test_fft_conv_module(
5050
weight = fft_conv_layer.weight
5151
bias = fft_conv_layer.bias
5252

53-
kwargs = dict(padding=padding, stride=stride, dilation=dilation, groups=groups,)
53+
kwargs = dict(
54+
padding=padding,
55+
stride=stride,
56+
dilation=dilation,
57+
groups=groups,
58+
)
5459

5560
y0 = fft_conv_layer(signal)
5661
y1 = torch_conv(signal, weight, bias=bias, **kwargs)
@@ -102,7 +107,12 @@ def test_fft_conv_backward_module(
102107
b0 = fft_conv_layer.bias
103108
b1 = b0.detach().clone().requires_grad_() if bias else None
104109

105-
kwargs = dict(padding=padding, stride=stride, dilation=dilation, groups=groups,)
110+
kwargs = dict(
111+
padding=padding,
112+
stride=stride,
113+
dilation=dilation,
114+
groups=groups,
115+
)
106116

107117
y0 = fft_conv_layer(signal)
108118
y1 = torch_conv(signal, w1, bias=b1, **kwargs)

0 commit comments

Comments
 (0)