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. Whichever
way comform is used I recommend running black first; it was mainly 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 are considered enabled if they are set in the CLI or
the config. If wrap is set in both then the CLI takes priority.
To use comform as a pre-commit hook add the following to your
.pre-commit-config.yaml:
- repo: https://github.com/j-hil/comform
rev: 0.1.1
hooks:
- id: comform
Development
Too see my development process see development.md.
Metadata
Release files for comform 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| comform-0.1.1.tar.gz | 27.9 kB | Without provenance | Details for comform-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| comform-0.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for comform-0.1.1-py2.py3-none-any.whl |
Total release size: 48.5 kB
Release files / comform-0.1.1.tar.gz
| Download URL | comform-0.1.1.tar.gz |
|---|---|
| Size | 27.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
81e62c9768cd4ff177fbd0e9773e4bb57a322f4dc1fdee4a9bda38da04cd584e
|
|
BLAKE2b-256 checksum How to use checksums |
77a4a9bfa6e542a700d6f15323cd37d28c4f881d8baa31fff335fd08d3de63f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / comform-0.1.1-py2.py3-none-any.whl
| Download URL | comform-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b14dadcb9e825cc54f56b21d9c0c3f4011b2ff470e8cd6c02a9fe227c534e562
|
|
BLAKE2b-256 checksum How to use checksums |
54b67a407a8f77a97bf816993e4a97239f2095cbfac879bcac294985b33aff89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for comform 0.1.1
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.