Metadata-Version: 2.4
Name: normcst
Version: 0.2.0
Summary: Tools for LibCST related to normalization.
Author-email: Andreas Rappold <not_evil@rappold1.at>
License: MIT License
        
        Copyright (c) 2025 Andreas Rappold
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        
Project-URL: Homepage, https://gitlab.com/notEvil/normcst
Project-URL: Bug Tracker, https://gitlab.com/notEvil/normcst/-/issues
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: libcst
Provides-Extra: black
Requires-Dist: black; extra == "black"
Provides-Extra: test
Requires-Dist: black; extra == "test"
Requires-Dist: pytest; extra == "test"
Provides-Extra: all
Requires-Dist: black; extra == "all"
Requires-Dist: pytest; extra == "all"
Dynamic: license-file

# _NormCST_

is a Python package providing tools for [_LibCST_](https://github.com/Instagram/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](https://github.com/Instagram/LibCST/pull/458).
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.
