Skip to content

Commit ae4c5db

Browse files
committed
Replace selected files in pre-commit config, fix some imports, ruff format
1 parent b834c9f commit ae4c5db

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: ruff
1111
args: [ --fix ]
1212
- id: ruff
13-
files: ^bin/.*\.py$
13+
files: ^bapctools/.*\.py$
1414
args: ["--select=I", "--fix"]
1515
- id: ruff-format
1616
- repo: https://github.com/pre-commit/mirrors-mypy

bapctools/program.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def _checks(self, bar: ProgressBar) -> None:
403403
pass
404404

405405
# Warn for known bad (non-deterministic) patterns in generators
406-
from validate import Validator
406+
from bapctools.validate import Validator
407407

408408
if isinstance(self, Generator) or isinstance(self, Validator):
409409
if "c++" in self.language.name.lower():

bapctools/run.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@
3030
shorten_path,
3131
warn,
3232
)
33-
from bapctools.verdicts import from_string, from_string_domjudge, RunUntil, Verdict, Verdicts, VerdictTable
33+
from bapctools.verdicts import (
34+
from_string,
35+
from_string_domjudge,
36+
RunUntil,
37+
Verdict,
38+
Verdicts,
39+
VerdictTable,
40+
)
3441

3542

3643
class Run:

bapctools/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
if TYPE_CHECKING: # Prevent circular import: https://stackoverflow.com/a/39757388
1212
from bapctools import run
13-
from bapctools import testcase
13+
from bapctools import testcase
1414
from bapctools.problem import Problem
1515

1616

bapctools/verdicts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ def _print(self, *args: Any, **kwargs: Any) -> None:
695695
eprint(*args, **kwargs)
696696

697697
def start(self, item: ITEM_TYPE = "") -> "TableProgressBar":
698-
from run import Run
698+
from bapctools.run import Run
699699

700700
assert isinstance(item, Run)
701701
self.table.add_test_case(item.testcase.name)

0 commit comments

Comments
 (0)