Skip to content

Commit 1cd1bb9

Browse files
committed
Update black version
1 parent a3831af commit 1cd1bb9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+18
-219
lines changed

make_script.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717

1818
def main(args):
19-
2019
parser = argparse.ArgumentParser(description="Generate tidy3d script from a simulation file.")
2120

2221
parser.add_argument(

requirements/dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# required for development
1111
pre-commit
12-
black==22.3.0
12+
black==23.12.1
1313
ruff
1414
tox
1515
pytest

tests/_test_local/_test_adjoint_performance.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ def f(eps_values):
167167

168168

169169
def test_time_custom_medium(use_emulated_run):
170-
171170
num_tests = 50
172171
nxs = np.logspace(0, 2.0, num_tests)
173172
times_sec = np.zeros(num_tests)

tests/_test_local/_test_data_performance.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def test_memory_2_load():
8282

8383

8484
def test_core_profile_small_1_save():
85-
8685
Nx, Ny, Nz, Nt = 100, 100, 100, 10
8786

8887
x = np.arange(Nx)
@@ -99,14 +98,12 @@ def test_core_profile_small_1_save():
9998

10099

101100
def test_core_profile_small_2_load():
102-
103101
with Profile():
104102
print(f"file_size = {os.path.getsize(PATH):.2e} Bytes")
105103
data = td.FieldTimeData.from_file(PATH)
106104

107105

108106
def test_core_profile_large():
109-
110107
sim_data = make_sim_data_1()
111108

112109
with Profile():
@@ -120,7 +117,6 @@ def test_core_profile_large():
120117

121118
@profile
122119
def test_speed_many_datasets():
123-
124120
Nx, Ny, Nz, Nf = 100, 100, 100, 1
125121

126122
x = np.arange(Nx)
@@ -162,7 +158,6 @@ def make_field_data(num_index: int):
162158
)
163159

164160
with Profile():
165-
166161
sim_data.to_file(PATH)
167162
sim_data2 = sim_data.from_file(PATH)
168163

tests/_test_local/_test_fit_web.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_dispersion_lossless():
3939
)
4040

4141
# a and c for each pole should be purely imaginary
42-
for (a, c) in best_medium.poles:
42+
for a, c in best_medium.poles:
4343
assert isclose(np.real(a), 0)
4444
assert isclose(np.real(c), 0)
4545

@@ -64,7 +64,6 @@ def test_dispersion_load_file():
6464

6565

6666
def test_dispersion_load_url():
67-
6867
url_csv = "https://refractiveindex.info/data_csv.php?datafile=data/main/Ag/Johnson.yml"
6968
fitter = StableDispersionFitter.from_url(url_csv)
7069

tests/test_components/test_apodization.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def test_negative_times():
3838

3939

4040
def test_plot():
41-
4241
run_time = 1.0e-13
4342
times = [0, 2.0e-14, 4.0e-14, 6.0e-14, 8.0e-14, 1.0e-13]
4443

tests/test_components/test_base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ def test_updated_copy():
118118

119119

120120
def test_equality():
121-
122121
# test freqs / arraylike
123122
mnt1 = td.FluxMonitor(size=(1, 1, 0), freqs=np.array([1, 2, 3]) * 1e12, name="1")
124123
mnt2 = td.FluxMonitor(size=(1, 1, 0), freqs=np.array([1, 2, 3]) * 1e12, name="1")

tests/test_components/test_custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ def verify_custom_dispersive_medium_methods(mat):
477477
poles_interp = mat.pole_residue.poles_on_grid(coord_interp)
478478
assert len(poles_interp) == len(mat.pole_residue.poles)
479479
coord_shape = tuple(len(grid) for grid in coord_interp.to_list)
480-
for (a, c) in poles_interp:
480+
for a, c in poles_interp:
481481
assert a.shape == coord_shape
482482
assert c.shape == coord_shape
483483

tests/test_components/test_geometry.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,6 @@ def test_geometry():
572572

573573

574574
def test_geometry_sizes():
575-
576575
# negative in size kwargs errors
577576
for size in (-1, 1, 1), (1, -1, 1), (1, 1, -1):
578577
with pytest.raises(pydantic.ValidationError):
@@ -851,7 +850,6 @@ def test_custom_surface_geometry(tmp_path):
851850

852851

853852
def test_geo_group_sim():
854-
855853
geo_grp = td.TriangleMesh.from_stl("tests/data/two_boxes_separate.stl")
856854
geos_orig = list(geo_grp.geometries)
857855
geo_grp_full = geo_grp.updated_copy(geometries=geos_orig + [td.Box(size=(1, 1, 1))])

tests/test_components/test_grid.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def test_field_grid():
3232

3333

3434
def test_grid():
35-
3635
boundaries_x = np.arange(-1, 2, 1)
3736
boundaries_y = np.arange(-2, 3, 1)
3837
boundaries_z = np.arange(-3, 4, 1)
@@ -205,7 +204,6 @@ def test_sim_nonuniform_large():
205204

206205

207206
def test_sim_grid():
208-
209207
sim = td.Simulation(
210208
size=(4, 4, 4),
211209
grid_spec=td.GridSpec.uniform(1.0),
@@ -252,7 +250,6 @@ def test_sim_symmetry_grid():
252250

253251

254252
def test_sim_pml_grid():
255-
256253
sim = td.Simulation(
257254
size=(4, 4, 4),
258255
grid_spec=td.GridSpec.uniform(1.0),
@@ -271,7 +268,6 @@ def test_sim_pml_grid():
271268

272269

273270
def test_sim_discretize_vol():
274-
275271
sim = td.Simulation(
276272
size=(4, 4, 4),
277273
grid_spec=td.GridSpec.uniform(1.0),
@@ -293,7 +289,6 @@ def test_sim_discretize_vol():
293289

294290

295291
def test_sim_discretize_plane():
296-
297292
sim = td.Simulation(
298293
size=(4, 4, 4),
299294
grid_spec=td.GridSpec.uniform(1.0),

0 commit comments

Comments
 (0)