Skip to main content

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.

Metadata

Release files for normcst 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for normcst 0.2.0
File Size Uploaded
normcst-0.2.0.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for normcst 0.2.0
File Interpreter ABI Platform
normcst-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.8 kB

Release files / normcst-0.2.0.tar.gz

Download URL normcst-0.2.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
36e8ea117709d77e794dabac0da7604d491b90515e60da902eeac854de1e86f6
BLAKE2b-256 checksum
How to use checksums
2aef9876cd7d3a399884b74dc2dbcc55c8126020e9d58b4d0f8ca09f13d966dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / normcst-0.2.0-py3-none-any.whl

Download URL normcst-0.2.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87e65939dc387e8ae58aa884eb7f486d870410b0c9b88116295c04f06e64fe64
BLAKE2b-256 checksum
How to use checksums
2a077b1f10d66bf7d4799968bd8981edd0cea3f80c25af52c3a2aadaf71acabf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page