Skip to main content

Read the latest Real Python tutorials

Project description

thonny-black-formatter

Thonny plugin for source formatting with black (Thonny >= 4.x)

This plugin enables formatting with black tool inside Thonny python editor.

History and rationale

Originally there was this plugin available:

https://pypi.org/project/thonny-black-format/

From Thonny release 4.0.0 the plugin stopped working and has been found in an abandoned project state (dead github project home page link) but still installable from PyPI repository.

This is an adptation built from the sources installes and modified in order to make it work for Thonny release 4.0.0 and - hopefully - subsequent.

Credits

All credits go to the author "Franccisco" of the original plugin.

All information available to me related to the original plugin is in the following two links.

Github repo: https://github.com/Franccisco/thonny-black-code-format [dead link] Docs: https://pypi.org/project/thonny-black-format/

How the plugin works

Install the plugin

The plugin must be installed using the Thonny menu:

Tools -> Manage plug-ins...

Format your code

The plugin adds the following menu entry:

Tools -> Format with black...

Use this command to format the current source being edited in the active window.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thonny-black-formatter-0.0.2.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

thonny_black_formatter-0.0.2-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page