Unverified Commit 90a4510c authored by IdoKendo's avatar IdoKendo Committed by GitHub
Browse files

[python-package] fix mypy errors about missing annotations and incompatible types (#5672)

parent f585eafa
...@@ -254,10 +254,10 @@ class _EarlyStoppingCallback: ...@@ -254,10 +254,10 @@ class _EarlyStoppingCallback:
self._reset_storages() self._reset_storages()
def _reset_storages(self) -> None: def _reset_storages(self) -> None:
self.best_score = [] self.best_score: List[float] = []
self.best_iter = [] self.best_iter: List[int] = []
self.best_score_list = [] self.best_score_list: List[Union[_EvalResultTuple, None]] = []
self.cmp_op = [] self.cmp_op: List[Callable[[float, float], bool]] = []
self.first_metric = '' self.first_metric = ''
def _gt_delta(self, curr_score: float, best_score: float, delta: float) -> bool: def _gt_delta(self, curr_score: float, best_score: float, delta: float) -> bool:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment