Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aeron/black.novaextension
Nova extension to use Black, the uncompromising Python code formatter.
https://github.com/aeron/black.novaextension
formatter nova-editor nova-extension python python-black
Last synced: 7 days ago
JSON representation
Nova extension to use Black, the uncompromising Python code formatter.
- Host: GitHub
- URL: https://github.com/aeron/black.novaextension
- Owner: Aeron
- License: apache-2.0
- Created: 2020-09-26T17:26:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-21T20:39:57.000Z (10 months ago)
- Last Synced: 2024-04-24T03:40:20.033Z (8 months ago)
- Topics: formatter, nova-editor, nova-extension, python, python-black
- Language: JavaScript
- Homepage:
- Size: 86.9 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Black Nova Extension
It’s a stand-alone Nova extension to use [Black](https://github.com/psf/black),
the uncompromising Python code formatter.## Requirements
Before using the extension, it’s necessary to install Black itself if you don’t have
one already.Black can be installed simply by running `pip install black`.
## Configuration
The extension supports both global and workspace configurations.
A workspace configuration always overrides a global one.### Options
There are three options available to configure: executable path, command arguments,
and format on save. By default, the executable path is `/usr/local/bin/black`, with no
additional arguments, and formatting on saving is on.You could alter the executable path if Black installed in a different place
or if `/usr/bin/env` usage is desirable.In the case of `/usr/bin/env`, it becomes the executable path, and `black` becomes
the first argument.### pyproject.toml
Also, the extension respects `pyproject.toml` in a project directory. So, there’s no
need to specify the `--config` argument explicitly.