Python Comment Conformity Formatter
Project description
ComForm: Python Comment Conformity Formatter
An auto-formatter for pretty and readable comment formatting in python.
WARNING: comform
is made for my own usage so it's not been tested in a variety of
environments. Use it on your own code at peril ;)
.
Comments are formatted as markdown text using the fantastic
mdformat
package. Treating comments as
markdown has drawbacks, but I've found these to be outweighed.
Usage
This package can be installed from PyPI as usual via pip install comform
and is meant
to be used as a command line tool. It can also be used as a pre-commit
hook, but only
with a local copy installed (known issue, see
here). Whichever way comform
is used I
recommend running black
first; it was developed for this use-case.
The command line interface is:
comform [-h] [--version] [--check] [--align] [--dividers] [--wrap N] paths [paths ...]
and inputs can also be configured in pyproject.toml
:
[tool.comform]
# these are the default values:
check = false
align = false
dividers = false
wrap = 88
check
, align
and dividers
work if they are set in the CLI or the config. If
wrap
is set in both then the CLI takes priority.
Development
Too see my development process see development.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file comform-0.1.0.tar.gz
.
File metadata
- Download URL: comform-0.1.0.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 410efbb96242664e72ec72fd5beac028fef4611c4fd0ff4a1bdf7ce6ec286801 |
|
MD5 | e2fb97f5c899b58fdec76fa7559723ad |
|
BLAKE2b-256 | c44a4193a0f04884ab050e639c90d1bf2ebfaf75570b0331e71d93562d899c05 |
File details
Details for the file comform-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: comform-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec590da051f0b1ba55464c774ccfc7c7de2e539c18446f396c2b91009eef0a43 |
|
MD5 | 3eb8aa500d23b4019b93eb4eae743c82 |
|
BLAKE2b-256 | 976a4ad538a595e84f6b1ce2b76647aedb9856ac67363235996e902891c16dc0 |