Skip to content

Commit 5cfcbc4

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ba3641f commit 5cfcbc4

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

mypy/main.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ def main(
162162
print(summary, file=stdout, flush=True)
163163
# Only notes should also output success
164164
elif not messages or n_notes == len(messages):
165-
print(formatter.format_success(len(sources), options.color_output), file=stdout, flush=True)
165+
print(
166+
formatter.format_success(len(sources), options.color_output),
167+
file=stdout,
168+
flush=True,
169+
)
166170

167171
if options.install_types and not options.non_interactive:
168172
result = install_types(formatter, options, after_run=True, non_interactive=False)
@@ -254,6 +258,7 @@ def show_messages(
254258
msg = formatter.colorize(msg)
255259
print(msg, file=f, flush=True)
256260

261+
257262
# Make the help output a little less jarring.
258263
class AugmentedHelpFormatter(argparse.RawDescriptionHelpFormatter):
259264
def __init__(self, prog: str, **kwargs: Any) -> None:

mypy/util.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,11 @@ class FancyFormatter:
592592
"""
593593

594594
def __init__(
595-
self, f_out: IO[str] | None, f_err: IO[str] | None, hide_error_codes: bool, hide_success: bool = False
595+
self,
596+
f_out: IO[str] | None,
597+
f_err: IO[str] | None,
598+
hide_error_codes: bool,
599+
hide_success: bool = False,
596600
) -> None:
597601
self.hide_error_codes = hide_error_codes
598602
self.hide_success = hide_success
@@ -601,7 +605,11 @@ def __init__(
601605
if sys.platform not in ("linux", "darwin", "win32", "emscripten"):
602606
self.dummy_term = True
603607
return
604-
if (f_out is None or f_err is None) or not should_force_color() and (not f_out.isatty() or not f_err.isatty()):
608+
if (
609+
(f_out is None or f_err is None)
610+
or not should_force_color()
611+
and (not f_out.isatty() or not f_err.isatty())
612+
):
605613
self.dummy_term = True
606614
return
607615
if sys.platform == "win32":

0 commit comments

Comments
 (0)