Skip to content

Commit 17b8cac

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 242ab00 commit 17b8cac

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

mypy/build.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,15 @@ def default_flush_errors(
193193

194194
try:
195195
result = _build(
196-
sources, options, alt_lib_path, flush_errors, fscache, stdout, stderr, extra_plugins, on_plugins_loaded=on_plugins_loaded
196+
sources,
197+
options,
198+
alt_lib_path,
199+
flush_errors,
200+
fscache,
201+
stdout,
202+
stderr,
203+
extra_plugins,
204+
on_plugins_loaded=on_plugins_loaded,
197205
)
198206
result.errors = messages
199207
return result
@@ -217,7 +225,7 @@ def _build(
217225
stdout: TextIO,
218226
stderr: TextIO,
219227
extra_plugins: Sequence[Plugin],
220-
on_plugins_loaded: Callable[[], None] | None = None
228+
on_plugins_loaded: Callable[[], None] | None = None,
221229
) -> BuildResult:
222230
if platform.python_implementation() == "CPython":
223231
# Run gc less frequently, as otherwise we can spent a large fraction of

mypy/config_parser.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import sys
99
from io import StringIO
1010

11-
from mypy.errorcodes import error_codes
12-
1311
if sys.version_info >= (3, 11):
1412
import tomllib
1513
else:

mypy/main.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ def main(
8686
stdout.reconfigure(errors="backslashreplace")
8787

8888
fscache = FileSystemCache()
89-
sources, options, on_plugins_loaded = process_options(args, stdout=stdout, stderr=stderr, fscache=fscache)
89+
sources, options, on_plugins_loaded = process_options(
90+
args, stdout=stdout, stderr=stderr, fscache=fscache
91+
)
9092
if clean_exit:
9193
options.fast_exit = False
9294

@@ -124,7 +126,9 @@ def main(
124126
install_types(formatter, options, non_interactive=options.non_interactive)
125127
return
126128

127-
res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr, on_plugins_loaded=on_plugins_loaded)
129+
res, messages, blockers = run_build(
130+
sources, options, fscache, t0, stdout, stderr, on_plugins_loaded=on_plugins_loaded
131+
)
128132

129133
if options.non_interactive:
130134
missing_pkgs = read_types_packages_to_install(options.cache_dir, after_run=True)
@@ -182,7 +186,7 @@ def run_build(
182186
t0: float,
183187
stdout: TextIO,
184188
stderr: TextIO,
185-
on_plugins_loaded: Callable[[], None] | None = None
189+
on_plugins_loaded: Callable[[], None] | None = None,
186190
) -> tuple[build.BuildResult | None, list[str], bool]:
187191
formatter = util.FancyFormatter(
188192
stdout, stderr, options.hide_error_codes, hide_success=bool(options.output)
@@ -209,7 +213,16 @@ def flush_errors(filename: str | None, new_messages: list[str], serious: bool) -
209213
try:
210214
# Keep a dummy reference (res) for memory profiling afterwards, as otherwise
211215
# the result could be freed.
212-
res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr, on_plugins_loaded=on_plugins_loaded)
216+
res = build.build(
217+
sources,
218+
options,
219+
None,
220+
flush_errors,
221+
fscache,
222+
stdout,
223+
stderr,
224+
on_plugins_loaded=on_plugins_loaded,
225+
)
213226
except CompileError as e:
214227
blockers = True
215228
if not e.use_stdout:

0 commit comments

Comments
 (0)