diff --git a/pymatgen/core/trajectory.py b/pymatgen/core/trajectory.py index 1e365142285..962c5d374db 100644 --- a/pymatgen/core/trajectory.py +++ b/pymatgen/core/trajectory.py @@ -124,7 +124,7 @@ def __init__( if isinstance(lattice, Lattice): lattice = lattice.matrix elif isinstance(lattice, list) and isinstance(lattice[0], Lattice): - lattice = [x.matrix for x in lattice] # type: ignore + lattice = [cast(Lattice, x).matrix for x in lattice] lattice = np.asarray(lattice) if not constant_lattice and lattice.shape == (3, 3):