Skip to content

Commit e24e5c4

Browse files
authored
Merge pull request #321 from online-judge-tools/upgrade-formatters
Upgrade the versions of formatters
2 parents 698e168 + 0e1142e commit e24e5c4

File tree

8 files changed

+31
-28
lines changed

8 files changed

+31
-28
lines changed

.github/workflows/format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ jobs:
1919
run: |
2020
oj-verify -h
2121
pylint --disable=all --enable=unused-import onlinejudge_verify onlinejudge_bundle tests setup.py
22-
isort --check-only --diff --recursive onlinejudge_verify onlinejudge_bundle tests setup.py
22+
isort --check-only --diff onlinejudge_verify onlinejudge_bundle tests setup.py
2323
yapf --diff --recursive onlinejudge_verify onlinejudge_bundle tests setup.py | tee yapf.patch && test ! -s yapf.patch
2424
mypy onlinejudge_verify onlinejudge_bundle setup.py

onlinejudge_bundle/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from typing import *
77

88
import colorlog
9+
910
import onlinejudge_verify.languages.list
1011

1112
logger = getLogger(__name__)

onlinejudge_verify/documentation/build.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
from logging import getLogger
88
from typing import *
99

10+
import pkg_resources
11+
import yaml
12+
1013
import onlinejudge_verify.documentation.front_matter
1114
import onlinejudge_verify.languages.list
1215
import onlinejudge_verify.utils as utils
13-
import pkg_resources
14-
import yaml
1516
from onlinejudge_verify.documentation.type import *
1617

1718
logger = getLogger(__name__)
@@ -86,11 +87,11 @@ def _render_source_code_stat(stat: SourceCodeStat, *, basedir: pathlib.Path) ->
8687

8788

8889
def _render_source_code_stat_for_page(
89-
path: pathlib.Path,
90-
*,
91-
source_code_stats_dict: Dict[pathlib.Path, SourceCodeStat],
92-
page_title_dict: Dict[pathlib.Path, str],
93-
basedir: pathlib.Path,
90+
path: pathlib.Path,
91+
*,
92+
source_code_stats_dict: Dict[pathlib.Path, SourceCodeStat],
93+
page_title_dict: Dict[pathlib.Path, str],
94+
basedir: pathlib.Path,
9495
) -> Dict[str, Any]:
9596
relative_path = (basedir / path).resolve().relative_to(basedir)
9697
stat = source_code_stats_dict[relative_path]
@@ -114,10 +115,10 @@ def ext(relative_path: pathlib.Path) -> Dict[str, Any]:
114115

115116

116117
def _render_source_code_stats_for_top_page(
117-
*,
118-
source_code_stats: List[SourceCodeStat],
119-
page_title_dict: Dict[pathlib.Path, str],
120-
basedir: pathlib.Path,
118+
*,
119+
source_code_stats: List[SourceCodeStat],
120+
page_title_dict: Dict[pathlib.Path, str],
121+
basedir: pathlib.Path,
121122
) -> Dict[str, Any]:
122123
libraryCategories: Dict[str, List[Dict[str, str]]] = {}
123124
verificationCategories: Dict[str, List[Dict[str, str]]] = {}

onlinejudge_verify/documentation/configure.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@ def _build_verification_status(paths: List[pathlib.Path], *, verified_with: Dict
129129

130130

131131
def _get_source_code_stat(
132-
path: pathlib.Path,
133-
*,
134-
depends_on: Dict[pathlib.Path, List[pathlib.Path]],
135-
required_by: Dict[pathlib.Path, List[pathlib.Path]],
136-
verified_with: Dict[pathlib.Path, List[pathlib.Path]],
137-
verification_status: Dict[pathlib.Path, VerificationStatus],
138-
marker: VerificationMarker,
139-
basedir: pathlib.Path,
132+
path: pathlib.Path,
133+
*,
134+
depends_on: Dict[pathlib.Path, List[pathlib.Path]],
135+
required_by: Dict[pathlib.Path, List[pathlib.Path]],
136+
verified_with: Dict[pathlib.Path, List[pathlib.Path]],
137+
verification_status: Dict[pathlib.Path, VerificationStatus],
138+
marker: VerificationMarker,
139+
basedir: pathlib.Path,
140140
) -> SourceCodeStat:
141141
absolute_path = (basedir / path).resolve()
142142
relative_path = absolute_path.relative_to(basedir)

onlinejudge_verify/documentation/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
from logging import getLogger
44
from typing import *
55

6+
import pkg_resources
7+
import yaml
8+
69
import onlinejudge_verify.documentation.build as build
710
import onlinejudge_verify.documentation.configure as configure
811
import onlinejudge_verify.marker
9-
import pkg_resources
10-
import yaml
1112
from onlinejudge_verify.documentation.type import *
1213

1314
logger = getLogger(__name__)

onlinejudge_verify/languages/python.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import importlab.environment
1010
import importlab.fs
1111
import importlab.graph
12+
1213
from onlinejudge_verify.languages.models import Language, LanguageEnvironment
1314

1415
logger = getLogger(__name__)

onlinejudge_verify/verify.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99
from logging import getLogger
1010
from typing import *
1111

12+
import onlinejudge
1213
import onlinejudge_verify.languages.list
1314
import onlinejudge_verify.marker
1415

15-
import onlinejudge
16-
1716
logger = getLogger(__name__)
1817

1918

setup.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ classifiers =
1515

1616
[options.extras_require]
1717
dev =
18-
isort == 4.3.21
19-
mypy == 0.740
20-
pylint == 2.4.3
21-
yapf == 0.28.0
18+
isort == 5.5.2
19+
mypy == 0.782
20+
pylint == 2.6.0
21+
yapf == 0.30.0
2222

2323
[yapf]
2424
column_limit = 9999

0 commit comments

Comments
 (0)