Skip to content

Commit 18bdc6c

Browse files
committed
merge
2 parents 48f86dd + 16dd811 commit 18bdc6c

39 files changed

+603
-501
lines changed

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.6.0
3+
rev: v5.0.0
44
hooks:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
77
- repo: https://github.com/astral-sh/ruff-pre-commit
8-
rev: v0.9.4
8+
rev: v0.9.9
99
hooks:
1010
- id: ruff-format
1111
- id: ruff
1212
args: [ --fix ]
1313
- repo: https://github.com/pre-commit/mirrors-mypy
14-
rev: v1.11.0
14+
rev: v1.15.0
1515
hooks:
1616
- id: mypy
1717
additional_dependencies:

bin/config.py

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from collections.abc import Mapping, Sequence
88
from typing import Final, Literal, Optional
99

10+
SPEC_VERSION: Final[str] = "2023-07-draft"
11+
1012
# return values
1113
RTV_AC: Final[int] = 42
1214
RTV_WA: Final[int] = 43

bin/export.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def add_file(path, source):
172172

173173
# DOMjudge does not support 'type' in problem.yaml nor 'output_validator_args' in testdata.yaml yet.
174174
# TODO: Remove this once it does.
175-
if not config.args.kattis and not problem.settings.is_legacy():
175+
if not config.args.kattis:
176176
yaml_path = export_dir / "problem.yaml"
177177
yaml_data = [yaml_path.read_text(), "\nvalidation:"]
178178
if problem.custom_output:

bin/problem.py

+88-210
Large diffs are not rendered by default.

bin/tools.py

+13
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import solve_stats
4040
import download_submissions
4141
import stats
42+
import upgrade
4243
import validate
4344
import signal
4445

@@ -351,6 +352,13 @@ def build_parser():
351352
)
352353
subparsers.required = True
353354

355+
# upgrade
356+
subparsers.add_parser(
357+
"upgrade",
358+
parents=[global_parser],
359+
help="Upgrade a problem or contest.",
360+
)
361+
354362
# New contest
355363
contestparser = subparsers.add_parser(
356364
"new_contest",
@@ -916,6 +924,11 @@ def run_parsed_arguments(args):
916924
else:
917925
config.args.testcases = []
918926

927+
# upgrade commands.
928+
if action == "upgrade":
929+
upgrade.upgrade()
930+
return
931+
919932
# Skel commands.
920933
if action == "new_contest":
921934
skel.new_contest()

0 commit comments

Comments
 (0)