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

Method is_stub_def

src/black/lines.py:170–174  ·  view source on GitHub ↗

Is this line a function definition with a body consisting only of "..."?

(self)

Source from the content-addressed store, hash-verified

168
169 @property
170 def is_stub_def(self) -> bool:
171 """Is this line a function definition with a body consisting only of "..."?"""
172 return self.is_def and self.leaves[-4:] == [Leaf(token.COLON, ":")] + [
173 Leaf(token.DOT, ".") for _ in range(3)
174 ]
175
176 @property
177 def is_class_paren_empty(self) -> bool:

Callers

nothing calls this directly

Calls 1

LeafClass · 0.90

Tested by

no test coverage detected