MCPcopy
hub / github.com/psf/black / any_open_for_or_lambda

Method any_open_for_or_lambda

src/black/brackets.py:131–136  ·  view source on GitHub ↗

Return True if there is an open for or lambda expression on the line. See maybe_increment_for_loop_variable and maybe_increment_lambda_arguments for details.

(self)

Source from the content-addressed store, hash-verified

129 self.maybe_increment_for_loop_variable(leaf)
130
131 def any_open_for_or_lambda(self) -> bool:
132 """Return True if there is an open for or lambda expression on the line.
133
134 See maybe_increment_for_loop_variable and maybe_increment_lambda_arguments
135 for details."""
136 return bool(self._for_loop_depths or self._lambda_argument_depths)
137
138 def any_open_brackets(self) -> bool:
139 """Return True if there is an yet unmatched open bracket on the line."""

Callers 1

append_safeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected