Skip to content

removed deprecated typing #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/fuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import time
import threading
from colorama import Fore, Style
from typing import Callable
from collections.abc import Callable

import parallel
from util import *
Expand Down
3 changes: 2 additions & 1 deletion bin/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
import shutil
import secrets

from collections.abc import Callable
from pathlib import Path, PurePosixPath, PurePath
from typing import Callable, Literal, overload
from typing import Literal, overload

import config
import inspect
Expand Down
4 changes: 2 additions & 2 deletions bin/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import shutil
import sys
from pathlib import Path
from typing import Dict, Optional
from typing import Optional

from colorama import Fore, Style

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


def make_environment() -> Dict[str, str]:
def make_environment() -> dict[str, str]:
env = os.environ.copy()
# Search the contest directory and the latex directory.
latex_paths = [
Expand Down
3 changes: 2 additions & 1 deletion bin/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import os
import signal
import threading
from typing import Any, Callable, Generic, Literal, Optional, TypeVar
from collections.abc import Callable
from typing import Any, Generic, Literal, Optional, TypeVar

import config
import util
Expand Down
3 changes: 2 additions & 1 deletion bin/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
import sys
import threading

from collections.abc import Callable
from pathlib import Path
from typing import Callable, Literal, Optional, Type, TYPE_CHECKING
from typing import Literal, Optional, Type, TYPE_CHECKING

if TYPE_CHECKING: # Prevent circular import: https://stackoverflow.com/a/39757388
from program import Program
Expand Down
2 changes: 1 addition & 1 deletion bin/stats.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
from collections.abc import Callable
from pathlib import Path
from typing import Callable

from colorama import Fore, Style

Expand Down
3 changes: 2 additions & 1 deletion bin/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
import threading
import time
from enum import Enum
from collections.abc import Sequence
from pathlib import Path
from typing import Any, NoReturn, Optional, Sequence
from typing import Any, NoReturn, Optional

import yaml as yamllib
from colorama import Fore, Style
Expand Down