Skip to content

Commit

Permalink
Update to [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
yaugenst-flex committed Jul 29, 2024
1 parent 85bc872 commit e517037
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.8"
rev: "v0.5.5"
hooks:
- id: ruff
args: [ --fix ]
Expand Down
43 changes: 22 additions & 21 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ joblib = "*"
### Optional dependencies ###
# development core
bump-my-version = { version = "*", optional = true }
ruff = { version = "0.4.8", optional = true }
ruff = { version = "0.5.5", optional = true }
coverage = { version = "*", optional = true }
dill = { version = "*", optional = true }
ipython = { version = "*", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/test_sim_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def test_to_hdf5(tmp_path):
sim_data.to_file(fname=FNAME)
# Make sure data is loaded as Tidy3dDataArray and not xarray DataArray
for data, data2 in zip(sim_data.data, sim_data2.data):
assert type(data) == type(data2)
assert type(data) is type(data2)
assert sim_data == sim_data2


Expand Down
2 changes: 1 addition & 1 deletion tidy3d/components/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2898,7 +2898,7 @@ def _check_same_coordinates(
# we can have xarray.DataArray's of different types but still same coordinates
# we will deal with that case separately
both_xarrays = isinstance(a, xr.DataArray) and isinstance(b, xr.DataArray)
if (not both_xarrays) and type(a) != type(b):
if (not both_xarrays) and type(a) is type(b):
return False

if isinstance(a, UnstructuredGridDataset):
Expand Down
4 changes: 2 additions & 2 deletions tidy3d/components/field_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def integrate_1d(
pts_u: np.ndarray,
):
"""Trapezoidal integration in two dimensions."""
return np.trapz(np.squeeze(function) * np.squeeze(phase), pts_u, axis=0)
return np.trapz(np.squeeze(function) * np.squeeze(phase), pts_u, axis=0) # noqa: NPY201

def integrate_2d(
self,
Expand All @@ -372,7 +372,7 @@ def integrate_2d(
pts_v: np.ndarray,
):
"""Trapezoidal integration in two dimensions."""
return np.trapz(np.trapz(np.squeeze(function) * phase, pts_u, axis=0), pts_v, axis=0)
return np.trapz(np.trapz(np.squeeze(function) * phase, pts_u, axis=0), pts_v, axis=0) # noqa: NPY201

def _far_fields_for_surface(
self,
Expand Down

0 comments on commit e517037

Please sign in to comment.