Skip to content

Commit 461dc08

Browse files
fix mypy
1 parent 5fd1d0a commit 461dc08

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

emmet-core/emmet/core/neb.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from datetime import datetime
44
from pathlib import Path
55
from pydantic import BaseModel, Field
6-
from typing import Optional, Tuple, Union
6+
from typing import Optional, Tuple, Union, Sequence
77
from typing_extensions import Self
88

99
from monty.os.path import zpath
@@ -37,7 +37,7 @@ class NebMethod(ValueEnum):
3737
class NebTaskDoc(BaseModel, extra="allow"):
3838
"""Define schema for VASP NEB tasks."""
3939

40-
endpoint_structures: tuple[Structure, Structure] = Field(
40+
endpoint_structures: Sequence[Structure] = Field(
4141
None,
4242
description="The initial and final configurations (reactants and products) of the barrier.",
4343
)
@@ -152,6 +152,12 @@ def from_directory(
152152
else:
153153
inputs["orig_inputs"] = OrigInputs(**vis)
154154

155+
neb_method = (
156+
NebMethod.CLIMBING_IMAGE
157+
if inputs["inputs"].incar.get("LCLIMB", False)
158+
else NebMethod.STANDARD
159+
)
160+
155161
return cls(
156162
endpoint_structures=endpoint_structures,
157163
image_calculations=image_calculations,
@@ -160,11 +166,7 @@ def from_directory(
160166
orig_inputs=inputs["orig_inputs"],
161167
inputs=inputs["inputs"],
162168
image_objects=image_objects,
163-
neb_method=(
164-
NebMethod.CLIMBING_IMAGE
165-
if inputs["inputs"].incar.get("LCLIMB")
166-
else NebMethod.STANDARD
167-
),
169+
neb_method=neb_method,
168170
state=task_state,
169171
image_energies=[calc.output.energy for calc in image_calculations],
170172
custodian=_parse_custodian(dir_name),

0 commit comments

Comments
 (0)