Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions misc/incremental_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def main() -> None:
parser.add_argument(
"range_start",
metavar="COMMIT_ID_OR_NUMBER",
help="the commit id to start from, or the number of " "commits to move back (see above)",
help="the commit id to start from, or the number of commits to move back (see above)",
)
parser.add_argument(
"-r",
Expand Down Expand Up @@ -439,7 +439,7 @@ def main() -> None:
"--branch",
default=None,
metavar="NAME",
help="check out and test a custom branch" "uses the default if not specified",
help="check out and test a custom branch uses the default if not specified",
)
parser.add_argument("--sample", type=int, help="use a random sample of size SAMPLE")
parser.add_argument("--seed", type=str, help="random seed")
Expand Down
2 changes: 1 addition & 1 deletion mypy/checkexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ def check_call_expr_with_callee_type(
return ret_type

def check_union_call_expr(self, e: CallExpr, object_type: UnionType, member: str) -> Type:
""" "Type check calling a member expression where the base type is a union."""
"""Type check calling a member expression where the base type is a union."""
res: list[Type] = []
for typ in object_type.relevant_items():
# Member access errors are already reported when visiting the member expression.
Expand Down
3 changes: 1 addition & 2 deletions mypy/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,7 @@ def parse_section(
results["follow_imports"] = "skip"
if key == "almost_silent":
print(
"%salmost_silent has been replaced by " "follow_imports=error" % prefix,
file=stderr,
"%salmost_silent has been replaced by follow_imports=error" % prefix, file=stderr
)
if v:
if "follow_imports" not in results:
Expand Down
2 changes: 1 addition & 1 deletion mypy/fastparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ def do_func_def(
if any(arg_types) or return_type:
if len(arg_types) != 1 and any(isinstance(t, EllipsisType) for t in arg_types):
self.fail(
"Ellipses cannot accompany other argument types " "in function type signature",
"Ellipses cannot accompany other argument types in function type signature",
lineno,
n.col_offset,
)
Expand Down
2 changes: 1 addition & 1 deletion mypy/ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def __exit__(
# Wait for the client to finish reading the last write before disconnecting
if not FlushFileBuffers(self.connection):
raise IPCException(
"Failed to flush NamedPipe buffer," "maybe the client hung up?"
"Failed to flush NamedPipe buffer, maybe the client hung up?"
)
finally:
DisconnectNamedPipe(self.connection)
Expand Down
2 changes: 1 addition & 1 deletion mypy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def add_invertible_flag(
"--disallow-any-generics",
default=False,
strict_flag=True,
help="Disallow usage of generic types that do not specify explicit type " "parameters",
help="Disallow usage of generic types that do not specify explicit type parameters",
group=disallow_any_group,
)
add_invertible_flag(
Expand Down
2 changes: 1 addition & 1 deletion mypy/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ def incompatible_self_argument(
)

def incompatible_conditional_function_def(self, defn: FuncDef) -> None:
self.fail("All conditional function variants must have identical " "signatures", defn)
self.fail("All conditional function variants must have identical signatures", defn)

def cannot_instantiate_abstract_class(
self, class_name: str, abstract_attributes: dict[str, bool], context: Context
Expand Down
2 changes: 1 addition & 1 deletion mypy/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3715,7 +3715,7 @@ def check_arg_kinds(
if kind == ARG_POS:
if is_var_arg or is_kw_arg or seen_named or seen_opt:
fail(
"Required positional args may not appear " "after default, named or var args",
"Required positional args may not appear after default, named or var args",
node,
)
break
Expand Down
4 changes: 2 additions & 2 deletions mypy/semanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ def handle_missing_overload_decorators(
)
else:
self.fail(
"The implementation for an overloaded function " "must come last",
"The implementation for an overloaded function must come last",
defn.items[idx],
)
else:
Expand Down Expand Up @@ -3329,7 +3329,7 @@ def analyze_lvalue(
elif isinstance(lval, MemberExpr):
self.analyze_member_lvalue(lval, explicit_type, is_final)
if explicit_type and not self.is_self_member_ref(lval):
self.fail("Type cannot be declared in assignment to non-self " "attribute", lval)
self.fail("Type cannot be declared in assignment to non-self attribute", lval)
elif isinstance(lval, IndexExpr):
if explicit_type:
self.fail("Unexpected type declaration", lval)
Expand Down
4 changes: 1 addition & 3 deletions mypy/stubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1732,9 +1732,7 @@ def parse_options(args: list[str]) -> Options:
parser.add_argument(
"--export-less",
action="store_true",
help=(
"don't implicitly export all names imported from other modules " "in the same package"
),
help="don't implicitly export all names imported from other modules in the same package",
)
parser.add_argument("-v", "--verbose", action="store_true", help="show more verbose messages")
parser.add_argument("-q", "--quiet", action="store_true", help="show fewer messages")
Expand Down
2 changes: 1 addition & 1 deletion mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,7 @@ def parse_options(args: list[str]) -> _Arguments:
parser.add_argument(
"--mypy-config-file",
metavar="FILE",
help=("Use specified mypy config file to determine mypy plugins " "and mypy path"),
help=("Use specified mypy config file to determine mypy plugins and mypy path"),
)
parser.add_argument(
"--custom-typeshed-dir", metavar="DIR", help="Use the custom typeshed in DIR"
Expand Down
2 changes: 1 addition & 1 deletion mypy/test/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def parse_test_case(case: DataDrivenTestCase) -> None:
):
raise ValueError(
(
"Stale modules after pass {} must be a subset of rechecked " "modules ({}:{})"
"Stale modules after pass {} must be a subset of rechecked modules ({}:{})"
).format(passnum, case.file, first_item.line)
)

Expand Down
3 changes: 2 additions & 1 deletion mypy/test/test_find_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ def test_find_sources_exclude(self) -> None:
"/kg",
"/g.py",
"/bc",
"/xxx/pkg/a2/b/f.py" "xxx/pkg/a2/b/f.py",
"/xxx/pkg/a2/b/f.py",
"xxx/pkg/a2/b/f.py",
]
big_exclude2 = ["|".join(big_exclude1)]
for big_exclude in [big_exclude1, big_exclude2]:
Expand Down