Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't skip magic-trailing-comma [black] #13418

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 1 deletion mypy/checkexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
# Type of callback user for checking individual function arguments. See
# check_args() below for details.
ArgChecker: _TypeAlias = Callable[
[Type, Type, ArgKind, Type, int, int, CallableType, Optional[Type], Context, Context], None,
[Type, Type, ArgKind, Type, int, int, CallableType, Optional[Type], Context, Context], None
]

# Maximum nesting level for math union in overloads, setting this to large values
Expand Down
8 changes: 7 additions & 1 deletion mypy/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@
from mypy.options import PER_MODULE_OPTIONS, Options

_CONFIG_VALUE_TYPES: _TypeAlias = Union[
str, bool, int, float, Dict[str, str], List[str], Tuple[int, int],
str,
bool,
int,
float,
Dict[str, str],
List[str],
Tuple[int, int],
]
_INI_PARSER_CALLABLE: _TypeAlias = Callable[[Any], _CONFIG_VALUE_TYPES]

Expand Down
5 changes: 4 additions & 1 deletion mypy/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2040,7 +2040,10 @@ class RevealExpr(Expression):
local_nodes: Optional[List[Var]]

def __init__(
self, kind: int, expr: Optional[Expression] = None, local_nodes: Optional[List[Var]] = None
self,
kind: int,
expr: Optional[Expression] = None,
local_nodes: Optional[List[Var]] = None,
) -> None:
super().__init__()
self.expr = expr
Expand Down
2 changes: 1 addition & 1 deletion mypy/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
)

ReporterClasses: _TypeAlias = Dict[
str, Tuple[Callable[["Reports", str], "AbstractReporter"], bool],
str, Tuple[Callable[["Reports", str], "AbstractReporter"], bool]
]

reporter_classes: Final[ReporterClasses] = {}
Expand Down
5 changes: 4 additions & 1 deletion mypy/semanal_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ def cleanup_builtin_scc(state: State) -> None:


def semantic_analysis_for_targets(
state: State, nodes: List[FineGrainedDeferredNode], graph: Graph, saved_attrs: SavedAttributes
state: State,
nodes: List[FineGrainedDeferredNode],
graph: Graph,
saved_attrs: SavedAttributes,
) -> None:
"""Semantically analyze only selected nodes in a given module.

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ build-backend = "setuptools.build_meta"
[tool.black]
line-length = 99
target-version = ['py37']
skip-magic-trailing-comma = true
extend-exclude = '''
^/mypy/typeshed|
^/mypyc/test-data|
Expand Down