flake8-new-union-types
Flake8 plugin to enforce the new Union and Optional annotation syntax defined in PEP 604.
Union[X, Y] = X | Y
Optional[X] = X | None
Installation
pip install flake8-new-union-types
or if you use poetry:
poetry add --dev flake8-new-union-types
Usage
Error list
- NU001 Use "A | B" syntax instead of Union (PEP 604)
- NU002 Use "A | None" syntax instead of Optional (PEP 604)
Configuration
There is no way to configure the plugin at the moment.
Metadata
Release files for flake8-new-union-types 0.2.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 | |
|---|---|---|---|
| flake8-new-union-types-0.2.0.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_new_union_types-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.4 kB
Release files / flake8-new-union-types-0.2.0.tar.gz
| Download URL | flake8-new-union-types-0.2.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f06ac1aedf760d0c057603c3bf897089707e15a41a8d1cdc89afc365fce27f82
|
|
BLAKE2b-256 checksum How to use checksums |
6c282184341a63d46eabfad4e7c3c38cbe7f2b9e47aa3fd09b79dca3d10e0d2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.3
|
Release files / flake8_new_union_types-0.2.0-py3-none-any.whl
| Download URL | flake8_new_union_types-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74b5ab72b2b500c4ddcad0ba4bcc3b88adc5a556615b0746120890f4d1d2731e
|
|
BLAKE2b-256 checksum How to use checksums |
2387a98e9bbd10e08b4a08efda9deef00942a63cdb75f1f6121f106140e6dce6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.3
|