Skip to content

Commit e343351

Browse files
committed
Better format complex conditional
1 parent 4406bb9 commit e343351

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mypy/messages.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,12 +1975,12 @@ def [T <: int] f(self, x: int, y: T) -> None
19751975
s += ' = ...'
19761976

19771977
# If we got a "special arg" (i.e: self, cls, etc...), prepend it to the arg list
1978-
if isinstance(tp.definition, FuncDef) and \
1979-
tp.definition.name is not None and \
1980-
tp.definition.arguments:
1978+
if (isinstance(tp.definition, FuncDef) and
1979+
tp.definition.name is not None and
1980+
tp.definition.arguments):
19811981
definition_args = [arg.variable.name for arg in tp.definition.arguments]
1982-
if definition_args and tp.arg_names != definition_args \
1983-
and len(definition_args) > 0 and definition_args[0]:
1982+
if (tp.arg_names != definition_args and
1983+
definition_args[0]):
19841984
if s:
19851985
s = ', ' + s
19861986
s = definition_args[0] + s

0 commit comments

Comments
 (0)