formate.ellipses¶
Move ellipses (...) for type stubs onto the end of the stub definition.
Before:
def foo(value: str) -> int: ...After:
def foo(value: str) -> int: ...
-
class
EllipsisRewriter(source)[source]¶ Bases:
RewriterMove ellipses (
...) for type stubs onto the end of the stub definition.- Parameters
source (
str) – The source to reformat.
-
rewrite_ellipsis(node)[source]¶ Responsible for the actual rewriting.
- Parameters
node (
Union[FunctionDef,AsyncFunctionDef,ClassDef]) – The node to rewrite.