Metadata-Version: 2.1
Name: no-optional
Version: 0.1.0
Summary: An awesome package is coming soon! 🎉
Home-page: https://github.com/Kludex/no-optional
Author: Marcelo Trylesinski
Author-email: marcelotryle@email.com
License: MIT
Project-URL: Twitter, https://twitter.com/marcelotryle
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: libcst
Provides-Extra: test
Requires-Dist: coverage[toml] (>=6.2) ; extra == 'test'
Requires-Dist: pytest (>=6.2.5) ; extra == 'test'

<h1 align="center">
    <strong>no-optional</strong>
</h1>
<p align="center">
    <a href="https://github.com/Kludex/no-optional" target="_blank">
        <img src="https://img.shields.io/github/last-commit/Kludex/no-optional" alt="Latest Commit">
    </a>
        <img src="https://img.shields.io/github/workflow/status/Kludex/no-optional/Test">
        <img src="https://img.shields.io/codecov/c/github/Kludex/no-optional">
    <br />
    <a href="https://pypi.org/project/no-optional" target="_blank">
        <img src="https://img.shields.io/pypi/v/no-optional" alt="Package version">
    </a>
    <img src="https://img.shields.io/pypi/pyversions/no-optional">
    <img src="https://img.shields.io/github/license/Kludex/no-optional">
</p>

This [codemod](https://libcst.readthedocs.io/en/stable/codemods_tutorial.html) replaces `typing.Optional[T]` by `typing.Union[T, None]` in the codebase.

## Installation

```bash
pip install no-optional
```

## Usage

Run the following on the repository you want to format:

```bash
python -m libcst.tool initialize .
```

Then, add the `no_optional` modules to the `modules` list on the `.libcst.codemod.yaml` generated.

Then you are able to run:

```bash
python3 -m libcst.tool codemod main.NoOptionalCommand <files>
```

## License

This project is licensed under the terms of the MIT license.


