Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>TuckNew to Visual Studio Code? Get it now.
Tuck

Tuck

Peter Law

|
1,300 installs
| (0) | Free
Semi-automated python formatting
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VSCode Tuck

CircleCI

VSCode extension for tuck -- semi-automated Python formatting.

Install

Install from the Extension Marketplace using this extensions full name: peterjclaw.tuck.

Features

This extension current provides a single command, equivalent to calling tuck against the current file and using the cursor position as the position to wrap.

The command can most easily be run using the keyboard shortcut Alt+Shift+W.

Examples

Function definition

Place cursor on foo or within the parentheses, then run the command:

def foo(bar: str, quox: int = 0) -> float:
    return 4.2

wraps to:

def foo(
    bar: str,
    quox: int = 0,
) -> float:
    return 4.2

List comprehension

Place cursor on for, then run the command:

[x for x in 'aBcD' if x.isupper()]

wraps to:

[
    x
    for x in 'aBcD'
    if x.isupper()
]

Release Notes

See CHANGELOG.md.

Attribution

Tuck uses asttokens to aid its handling of the Python AST. asttokens is included in the extension, licensed under Apache 2.0.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft