Skip to content

Commit a447712

Browse files
mzuennimpsijm
authored andcommitted
removed deprecated typing
1 parent bee1a57 commit a447712

File tree

7 files changed

+12
-8
lines changed

7 files changed

+12
-8
lines changed

bin/fuzz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import time
77
import threading
88
from colorama import Fore, Style
9-
from typing import Callable
9+
from collections.abc import Callable
1010

1111
import parallel
1212
from util import *

bin/generate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
import shutil
99
import secrets
1010

11+
from collections.abc import Callable
1112
from pathlib import Path, PurePosixPath, PurePath
12-
from typing import Callable, Literal, overload
13+
from typing import Literal, overload
1314

1415
import config
1516
import inspect

bin/latex.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import shutil
66
import sys
77
from pathlib import Path
8-
from typing import Dict, Optional
8+
from typing import Optional
99

1010
from colorama import Fore, Style
1111

@@ -179,7 +179,7 @@ def get_tl(problem: "problem.Problem"):
179179
return tl if print_tl else ''
180180

181181

182-
def make_environment() -> Dict[str, str]:
182+
def make_environment() -> dict[str, str]:
183183
env = os.environ.copy()
184184
# Search the contest directory and the latex directory.
185185
latex_paths = [

bin/parallel.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import os
44
import signal
55
import threading
6-
from typing import Any, Callable, Generic, Literal, Optional, TypeVar
6+
from collections.abc import Callable
7+
from typing import Any, Generic, Literal, Optional, TypeVar
78

89
import config
910
import util

bin/problem.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
import sys
55
import threading
66

7+
from collections.abc import Callable
78
from pathlib import Path
8-
from typing import Callable, Literal, Optional, Type, TYPE_CHECKING
9+
from typing import Literal, Optional, Type, TYPE_CHECKING
910

1011
if TYPE_CHECKING: # Prevent circular import: https://stackoverflow.com/a/39757388
1112
from program import Program

bin/stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
2+
from collections.abc import Callable
23
from pathlib import Path
3-
from typing import Callable
44

55
from colorama import Fore, Style
66

bin/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
import threading
1515
import time
1616
from enum import Enum
17+
from collections.abc import Sequence
1718
from pathlib import Path
18-
from typing import Any, NoReturn, Optional, Sequence
19+
from typing import Any, NoReturn, Optional
1920

2021
import yaml as yamllib
2122
from colorama import Fore, Style

0 commit comments

Comments
 (0)