Skip to content

Commit 65c5cb1

Browse files
committed
fix pre-commit issues
1 parent 5a3f179 commit 65c5cb1

5 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/meow/base_model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _validate_model(cls, obj: Any) -> Any:
6464
return obj
6565

6666
@classmethod
67-
def model_validate( # type: ignore[reportIncompatibleMethodOverride]
67+
def model_validate( # type: ignore[reportIncompatibleMethodOverride] # ty: ignore[invalid-method-override]
6868
cls,
6969
obj: Any,
7070
*,
@@ -99,7 +99,7 @@ def model_validate( # type: ignore[reportIncompatibleMethodOverride]
9999
)
100100

101101
@classmethod
102-
def model_validate_json( # type: ignore[reportIncompatibleMethodOverride]
102+
def model_validate_json( # type: ignore[reportIncompatibleMethodOverride] # ty: ignore[invalid-method-override]
103103
cls,
104104
json_data: str | bytes | bytearray,
105105
*,
@@ -329,5 +329,5 @@ def _eq(self: object, other: object) -> bool:
329329
return _eq(list(self), list(other))
330330
return all(_eq(a, b) for a, b in zip(self, other, strict=False))
331331
if isinstance(self, float) or isinstance(other, float):
332-
return abs(self - other) < 1e-6 # type: ignore[reportOperatorIssue]
332+
return abs(self - other) < 1e-6 # type: ignore[reportOperatorIssue] # ty: ignore[unsupported-operator]
333333
return self == other

src/meow/eme/cascade.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def compute_s_matrix_sax(
4646
propagations = propagations_fn(modes, cells, cell_lengths=cell_lengths)
4747
interfaces = interfaces_fn(modes)
4848
net = _get_netlist(propagations, interfaces)
49-
_, analyze_fn, evaluate_fn = circuit_backends[sax_backend] # type: ignore[reportArgumentType]
49+
_, analyze_fn, evaluate_fn = circuit_backends[sax_backend] # type: ignore[reportArgumentType] # ty: ignore[invalid-assignment]
5050
# TODO: use analyze_instances instead of manually converting to scoo ?
5151
net["instances"] = {k: sax.scoo(v) for k, v in net["instances"].items()}
5252
analyzed = analyze_fn(net["instances"], net["nets"], net["ports"])

src/meow/fde/lumerical.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ def compute_modes_lumerical(
3939
Returns:
4040
The computed and post-processed list of modes.
4141
"""
42-
from lumapi import LumApiError # type: ignore[reportMissingImports]
42+
from lumapi import ( # ty: ignore[unresolved-import]
43+
LumApiError, # type: ignore[reportMissingImports]
44+
)
4345

4446
sim = get_sim(sim=sim)
4547

src/meow/geometries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def _trimesh(
252252
prism = extrude_polygon(poly, self.z_max * sz - self.z_min * sz)
253253
prism = cast(Trimesh, prism.apply_translation((0, 0, self.z_min * sz)))
254254
if color is not None:
255-
prism.visual.face_colors = _to_rgba(color) # type: ignore[invalid-assignment]
255+
prism.visual.face_colors = _to_rgba(color) # type: ignore[invalid-assignment] # ty: ignore[invalid-assignment]
256256
return prism
257257

258258

src/tests/test_mode_operators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
def test_multiply_modes():
1111
"""multiplying two modes objects is not supported and should raise a TypeError"""
1212
try:
13-
mode1 * mode2 # type: ignore[reportOperatorIssue]
13+
mode1 * mode2 # type: ignore[reportOperatorIssue] # ty: ignore[unsupported-operator]
1414
pytest.fail("Expected TypeError when multiplying two modes objects")
1515
except TypeError:
1616
pass

0 commit comments

Comments
 (0)