Skip to content

Commit

Permalink
Fix " " line joining after black reformat (#13394)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Aug 12, 2022
1 parent b1364c5 commit 36944f6
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions mypy/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2085,9 +2085,9 @@ def load_fine_grained_deps(self) -> Dict[str, Set[str]]:
return self.manager.load_fine_grained_deps(self.id)

def load_tree(self, temporary: bool = False) -> None:
assert self.meta is not None, (
"Internal error: this method must be called only" " for cached modules"
)
assert (
self.meta is not None
), "Internal error: this method must be called only for cached modules"

data = _load_json_file(
self.meta.data_json, self.manager, "Load tree ", "Could not load tree: "
Expand Down
2 changes: 1 addition & 1 deletion mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1958,7 +1958,7 @@ def erase_override(t: Type) -> Type:
)
if op_method_wider_note:
self.note(
"Overloaded operator methods can't have wider argument types" " in overrides",
"Overloaded operator methods can't have wider argument types in overrides",
node,
code=codes.OVERRIDE,
)
Expand Down
8 changes: 4 additions & 4 deletions mypy/checkstrformat.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def find_non_escaped_targets(
pos += 1
else:
msg.fail(
"Invalid conversion specifier in format string:" " unexpected }",
"Invalid conversion specifier in format string: unexpected }",
ctx,
code=codes.STRING_FORMATTING,
)
Expand All @@ -291,7 +291,7 @@ def find_non_escaped_targets(
pos += 1
if nesting:
msg.fail(
"Invalid conversion specifier in format string:" " unmatched {",
"Invalid conversion specifier in format string: unmatched {",
ctx,
code=codes.STRING_FORMATTING,
)
Expand Down Expand Up @@ -567,7 +567,7 @@ def auto_generate_keys(self, all_specs: List[ConversionSpecifier], ctx: Context)
all_defined = all(bool(s.key) for s in all_specs)
if some_defined and not all_defined:
self.msg.fail(
"Cannot combine automatic field numbering and" " manual field specification",
"Cannot combine automatic field numbering and manual field specification",
ctx,
code=codes.STRING_FORMATTING,
)
Expand Down Expand Up @@ -805,7 +805,7 @@ def check_mapping_str_interpolation(
# Special case: for bytes formatting keys must be bytes.
if not isinstance(k, BytesExpr):
self.msg.fail(
"Dictionary keys in bytes formatting must be bytes," " not strings",
"Dictionary keys in bytes formatting must be bytes, not strings",
expr,
code=codes.STRING_FORMATTING,
)
Expand Down
4 changes: 2 additions & 2 deletions mypy/fixup.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def lookup_fully_qualified_typeinfo(
# Looks like a missing TypeInfo during an initial daemon load, put something there
assert (
allow_missing
), "Should never get here in normal mode," " got {}:{} instead of TypeInfo".format(
), "Should never get here in normal mode, got {}:{} instead of TypeInfo".format(
type(node).__name__, node.fullname if node else ""
)
return missing_info(modules)
Expand Down Expand Up @@ -355,7 +355,7 @@ def lookup_fully_qualified_alias(
# Looks like a missing TypeAlias during an initial daemon load, put something there
assert (
allow_missing
), "Should never get here in normal mode," " got {}:{} instead of TypeAlias".format(
), "Should never get here in normal mode, got {}:{} instead of TypeAlias".format(
type(node).__name__, node.fullname if node else ""
)
return missing_alias()
Expand Down
6 changes: 3 additions & 3 deletions mypy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,14 +765,14 @@ def add_invertible_flag(
"--warn-return-any",
default=False,
strict_flag=True,
help="Warn about returning values of type Any" " from non-Any typed functions",
help="Warn about returning values of type Any from non-Any typed functions",
group=lint_group,
)
add_invertible_flag(
"--warn-unreachable",
default=False,
strict_flag=False,
help="Warn about statements or expressions inferred to be" " unreachable",
help="Warn about statements or expressions inferred to be unreachable",
group=lint_group,
)

Expand Down Expand Up @@ -814,7 +814,7 @@ def add_invertible_flag(
"--strict-equality",
default=False,
strict_flag=True,
help="Prohibit equality, identity, and container checks for" " non-overlapping types",
help="Prohibit equality, identity, and container checks for non-overlapping types",
group=strictness_group,
)

Expand Down
2 changes: 1 addition & 1 deletion mypy/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@ def report_non_method_protocol(
self, tp: TypeInfo, members: List[str], context: Context
) -> None:
self.fail(
"Only protocols that don't have non-method members can be" " used with issubclass()",
"Only protocols that don't have non-method members can be used with issubclass()",
context,
)
if len(members) < 3:
Expand Down
2 changes: 1 addition & 1 deletion mypy/test/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ def pytest_addoption(parser: Any) -> None:
"--update-data",
action="store_true",
default=False,
help="Update test data to reflect actual output" " (supported only for certain tests)",
help="Update test data to reflect actual output (supported only for certain tests)",
)
group.addoption(
"--save-failures-to",
Expand Down
6 changes: 3 additions & 3 deletions mypy/test/testdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def run_case(self, testcase: DataDrivenTestCase) -> None:
a.append("== next ==")
a.extend(messages2)

assert files1 is not None and files2 is not None, (
"cases where CompileError" " occurred should not be run"
)
assert (
files1 is not None and files2 is not None
), "cases where CompileError occurred should not be run"
prefix = "__main__"
snapshot1 = snapshot_symbol_table(prefix, files1["__main__"].names)
snapshot2 = snapshot_symbol_table(prefix, files2["__main__"].names)
Expand Down
2 changes: 1 addition & 1 deletion mypy/typeanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def try_analyze_special_unbound_type(self, t: UnboundType, fullname: str) -> Opt
return AnyType(TypeOfAny.explicit)
elif fullname in FINAL_TYPE_NAMES:
self.fail(
"Final can be only used as an outermost qualifier" " in a variable annotation", t
"Final can be only used as an outermost qualifier in a variable annotation", t
)
return AnyType(TypeOfAny.from_error)
elif fullname == "typing.Tuple" or (
Expand Down

0 comments on commit 36944f6

Please sign in to comment.