python-compare-ast
Compares ASTs of Python files that have been changed in git.
Useful for checking if formatting changes do not modify the behaviour of the source code.
Requirements
Python 3.6 or newer.
Installation
$ pip install python-compare-ast
Usage
$ python-compare-ast [--git-dir <path_to_git_working_dir>]
git-dir defaults to the current directory.
Example output:
$ git clone https://github.com/pallets/click.git $ python-compare-ast --git-dir click Analysing /absolute/path/to/click/.git Repo is clean, comparing changes in latest commit (dfb842d95a7c146d8fe8140c8100065410d95c4d). warning: AST does not match for src/click/core.py warning: AST does not match for tests/test_options.py Found 2 AST differences.
If the git working directory is clean, the files changed in latest commit will be analysed. If the git working directory is dirty, the dirty files will will analysed. If no changed files has a different AST then before, python-compare-ast will exit with status code 0. However, if there are changes to the AST the exit code will be 1.
Metadata
Release files for python-compare-ast 1.0.0
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 |
|---|---|---|---|---|
| python-compare-ast-1.0.0.tar.gz | 5.9 kB | Without provenance | Details for python-compare-ast-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_compare_ast-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for python_compare_ast-1.0.0-py3-none-any.whl |
Total release size: 12.2 kB
Release files / python-compare-ast-1.0.0.tar.gz
| Download URL | python-compare-ast-1.0.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d65bd3dee59f2ea7012aa01d7c6ed52736a2ed9e8cdf47b3d603849d9b859ca8
|
|
BLAKE2b-256 checksum How to use checksums |
d044fac97aff33a3b3fcbf2a6a9edd2d922766c884e80b5dc5a32684330ccb17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10
|
Release files / python_compare_ast-1.0.0-py3-none-any.whl
| Download URL | python_compare_ast-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f456cc15c60cae6085b8fe46ffcc49d21e52583169d8e32f8893575638586cda
|
|
BLAKE2b-256 checksum How to use checksums |
473d60b77dcffca0fff80d0b96cf99e90b59316c92e12b1cde53778b39d61157
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1.post20200529 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10
|
Security for python-compare-ast 1.0.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.