Set return type for Learner.run to NoReturn.
@@ -19,7 +19,7 @@ This file specifies and documents the notions of `Actor` and `Learner`.
"""
import abc
-from typing import Generic, List, TypeVar
+from typing import Generic, List, NoReturn, TypeVar
from acme import types
# Internal imports.
@@ -134,7 +134,7 @@ class Learner(VariableSource, Worker):
def step(self):
"""Perform an update step of the learner's parameters."""
- def run(self):
+ def run(self) -> NoReturn:
"""Run the update loop; typically an infinite loop which calls step."""
while True:
self.step()
