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

Method visit_DEDENT

src/black/linegen.py:197–209  ·  view source on GitHub ↗

Decrease indentation level, maybe yield a line.

(self, node: Leaf)

Source from the content-addressed store, hash-verified

195 yield from self.visit_default(node)
196
197 def visit_DEDENT(self, node: Leaf) -> Iterator[Line]:
198 """Decrease indentation level, maybe yield a line."""
199 # The current line might still wait for trailing comments. At DEDENT time
200 # there won't be any (they would be prefixes on the preceding NEWLINE).
201 # Emit the line then.
202 yield from self.line()
203
204 # While DEDENT has no value, its prefix may contain standalone comments
205 # that belong to the current indentation level. Get 'em.
206 yield from self.visit_default(node)
207
208 # Finally, emit the dedent.
209 yield from self.line(-1)
210
211 def visit_stmt(
212 self, node: Node, keywords: set[str], parens: set[str]

Callers

nothing calls this directly

Calls 2

lineMethod · 0.95
visit_defaultMethod · 0.95

Tested by

no test coverage detected