Skip to content

Commit 65b0e07

Browse files
committed
fix some mypy errors
1 parent 774715c commit 65b0e07

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
strict_equality = True
33
disallow_untyped_calls = True
44
warn_unreachable = True
5-
exclude = (predicators/envs/assets|venv)
5+
exclude = (predicators/envs/assets|venv|prompts)
66

77
[mypy-predicators.*]
88
disallow_untyped_defs = True

predicators/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def _run_pipeline(env: BaseEnv,
233233

234234
def _handle_offline_learning(
235235
cogman: CogMan,
236-
offline_dataset: Dataset) -> Tuple[float, float, float, dict]:
236+
offline_dataset: Dataset) -> Tuple[int, float, float, dict]:
237237
"""Handle offline learning phase and initial evaluation."""
238238
num_offline_transitions = sum(
239239
len(traj.actions) for traj in offline_dataset.trajectories)

predicators/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import abc
66
import contextlib
7+
import copy
78
import datetime
89
import functools
910
import gc

scripts/plotting/mara/create_latex_table.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import math
44
from operator import gt, lt
5+
from typing import Set, Tuple
56

67
import numpy as np
78
import pandas as pd
@@ -215,7 +216,7 @@ def _main() -> None:
215216
if abs(mean - best_mean) <= BOLD_NUM_STDS * best_std:
216217
bolded.add((outer_label, inner_label))
217218
# Determine which should be red.
218-
red = set()
219+
red: Set[Tuple[str, str]] = set()
219220
# for entry, (mean, std, size) in entry_to_mean_std_size.items():
220221
# if size < RED_MIN_SIZE:
221222
# red.add(entry)

0 commit comments

Comments
 (0)