diff --git a/setup.py b/setup.py index 240aa4e08..b2e0a2d0b 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ # TODO: upgrade jupyter-client once # https://github.com/jupyter/jupyter_client/issues/637 is fixed "jupyter-client~=6.1.12", - "mypy==0.971", + "mypy~=0.981", "pandas~=1.4.3", "pytest~=7.1.2", "pytest-cov~=3.0.0", diff --git a/src/imitation/algorithms/preference_comparisons.py b/src/imitation/algorithms/preference_comparisons.py index 58897113f..d6e15de3e 100644 --- a/src/imitation/algorithms/preference_comparisons.py +++ b/src/imitation/algorithms/preference_comparisons.py @@ -15,6 +15,7 @@ List, Mapping, NamedTuple, + NoReturn, Optional, Sequence, Tuple, @@ -707,7 +708,7 @@ def __init__( def uncertainty_on(self) -> str: return self._uncertainty_on - def raise_uncertainty_on_not_supported(self): + def raise_uncertainty_on_not_supported(self) -> NoReturn: raise ValueError( f"""{self.uncertainty_on} not supported. `uncertainty_on` should be from `logit`, `probability`, or `label`""",