Skip to content

Commit 9091a8d

Browse files
committed
change typing
1 parent f4e23e2 commit 9091a8d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bin/problem.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,9 @@ def matches_existing_testcase(self, t):
11221122
self._testcase_hashes[h] = t
11231123
return None
11241124

1125-
def validate_data(problem, mode: validate.Mode, constraints: dict | bool | None = None) -> bool:
1125+
def validate_data(
1126+
problem, mode: validate.Mode, constraints: dict | Literal[True] | None = None
1127+
) -> bool:
11261128
"""Validate aspects of the test data files.
11271129
11281130
Arguments:
@@ -1289,7 +1291,7 @@ def validate_valid_extra_data(p) -> bool:
12891291
def _validate_data(
12901292
problem,
12911293
mode: validate.Mode,
1292-
constraints: dict | bool | None,
1294+
constraints: dict | Literal[True] | None,
12931295
action: str,
12941296
testcases: Sequence[testcase.Testcase],
12951297
extra: bool = False,

0 commit comments

Comments
 (0)