Skip to content

Commit

Permalink
fix pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
Han Wang committed Feb 2, 2024
1 parent 98c13bf commit 74873cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
ConfSelector,
)
from dpgen2.exploration.task import (
BaseExplorationTaskGroup,
ExplorationStage,
ExplorationTaskGroup,
)
Expand Down Expand Up @@ -67,7 +68,7 @@ def plan_next_iteration(
self,
report: Optional[ExplorationReport] = None,
trajs: Optional[List[Path]] = None,
) -> Tuple[bool, Optional[ExplorationTaskGroup], Optional[ConfSelector]]:
) -> Tuple[bool, Optional[BaseExplorationTaskGroup], Optional[ConfSelector]]:
if self.complete():
raise FatalError("Cannot plan because the stage has completed.")
if report is None:
Expand Down
4 changes: 2 additions & 2 deletions dpgen2/exploration/task/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ def add_task_group(

def make_task(
self,
) -> ExplorationTaskGroup:
) -> BaseExplorationTaskGroup:
"""
Make the LAMMPS task group.
Returns
-------
task_grp: ExplorationTaskGroup
task_grp: BaseExplorationTaskGroup
The returned lammps task group. The number of tasks is equal to
the summation of task groups defined by all the exploration groups
added to the stage.
Expand Down
4 changes: 2 additions & 2 deletions dpgen2/exploration/task/task_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ def __init__(
}


class FooTaskGroup(ExplorationTaskGroup):
class FooTaskGroup(BaseExplorationTaskGroup):
def __init__(self, numb_task):
super().__init__()
# TODO: confirm the following is correct
self.tlist = ExplorationTaskGroup()
self.tlist = BaseExplorationTaskGroup()
for ii in range(numb_task):
self.tlist.add_task(
FooTask(
Expand Down

0 comments on commit 74873cb

Please sign in to comment.