Skip to main content

Tools for LibCST related to normalization.

Project description

NormCST

is a Python package providing tools for LibCST related to normalization. The main contributions are normcst.ParenthesisTransformer, a libcst.CSTTransformer which adds necessary parentheses, and normcst.NoParenthesisTransformer, a libcst.CSTTransformer which removes all parenthesis. Secondary contributions are found in normcst.black and normcst.utils like roundtrips which verifies whether or not the given node survives a roundtrip (to_string -> parse -> deep_equals).

Quickstart

  • Install using pip
    • e.g. pipenv run python -m pip install normcst[all]
  • Import and use
    • e.g. import normcst and node.visit(normcst.ParenthesisTransformer())
  • Optionally run tests
    • e.g. pipenv run python -m pytest /path/to/normcst/tests

Personal remarks

2025-09-05

Almost 6 months ago I published this side project and mentioned it in Issue 341. Nothing really changed except that time provides confidence; it didn't fail me ever since. There hasn't been much interest in it either, or reason to complain. Anyways, it's on PyPI now.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

normcst-0.2.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

normcst-0.2.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file normcst-0.2.0.tar.gz.

File metadata

  • Download URL: normcst-0.2.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for normcst-0.2.0.tar.gz
Algorithm Hash digest
SHA256 36e8ea117709d77e794dabac0da7604d491b90515e60da902eeac854de1e86f6
MD5 5eb4fca6ad7bc1a770ab566c4b9bc65c
BLAKE2b-256 2aef9876cd7d3a399884b74dc2dbcc55c8126020e9d58b4d0f8ca09f13d966dd

See more details on using hashes here.

File details

Details for the file normcst-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: normcst-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for normcst-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87e65939dc387e8ae58aa884eb7f486d870410b0c9b88116295c04f06e64fe64
MD5 98a564fd388ff1842a7046502b53c44b
BLAKE2b-256 2a077b1f10d66bf7d4799968bd8981edd0cea3f80c25af52c3a2aadaf71acabf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page