Forked from cblack
Thank you for the setup work cblack. This fork is only to pin it, because our app is unable to keep up with black at the moment.
cblack
Custom Black Code Formatter for Python with 2-space indents
Same rules as Black, only with two-space indents.
Installation
cblack can be installed by running pip3 install cblack.
It requires Python 3.6.0+ to run but you can reformat Python 2 code with it as well.
Usage
python -m cblack {source_file_or_directory}
Options
python -m cblack --help
You can also go to https://github.com/psf/black for the latest options available
Why
After a long discussion about indentation levels it was decided by the main author that:
Two space indents are not distinct enough to be recommended by the Black coding style.
The whole pourpose of this project is to provide an alternative to black, with the exact same rules and behaviour, but using 2 spaces for indentation instead of 4. All other black options are still supported.
Second reason is that Google YAPF is not able to produce same output as black (mostly because of function arguments indentation), otherwise, if it was possible to do it, I would not have created this project.
How
I'm a busy man. I don't want to spend my time pulling latest changes from black regularly, so I've created a small package that depends on black and overrides a method to reindent using two spaces. Shall black developers break this behaviour I might end up cloning the whole project. But the aim of this project would still be the same.
Similar projects
- YAPF
- Autopep8
- pep8ify
- pyfmt
- prettier in node
- gofmt in go
- rustfmt in rust
Credits
All the credit is deserved to the people who created black on the first place.
Please visit black website:
Metadata
Release files for jwblack 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jwblack-1.3.0-py36-none-any.whl | Python 3.6 | none | any | Details for jwblack-1.3.0-py36-none-any.whl |
Release files / jwblack-1.3.0-py36-none-any.whl
| Download URL | jwblack-1.3.0-py36-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3.6 |
|
SHA-256 checksum How to use checksums |
8d616978dc54c11c35f7ef9e34f3c4446660f3e12f24068520dc6a2f0714dd90
|
|
BLAKE2b-256 checksum How to use checksums |
4d5d72074b6470f40d4bc0035a4bd3ab0a296aa937af94153576e32bdc4e41a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.9
|
Security for jwblack 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.