Metadata-Version: 2.1
Name: flake8-postponed-annotations
Version: 1.2.0
Summary: Flake8 postponed annotations validation
Home-page: https://github.com/plinss/flake8-postponed-annotations/
Author: Peter Linss
Author-email: pypi@linss.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Framework :: Flake8
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Programming Language :: Python
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
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: dev
Provides-Extra: test

# [flake8-postponed-annotations](https://github.com/plinss/flake8-postponed-annotations)

flake8 plugin to validate Postponed Evaluations of Annotations per PEP 563.

This plugin is used to enforce consistent usage of postponed evaluation of type annotations,
returning an error code when string literals are used for a type.

### Activation

By default the plugin activates when it sees an import that enables PEP563, e.g.:

    from __future__ import annotations

The `postponed-annotations-activation` option may be set to 'always' or 'never',
to force a specific behavior.


## Installation

Standard python package installation:

    pip install flake8-postponed-annotations


## Options

`postponed-annotations-activation`
: Controls activation of the plugin, 
choices: `auto`, `always`, `never` (default: `auto`)

`postponed-annotations-include-name`
: Include plugin name in messages

`postponed-annotations-no-include-name`
: Do not include plugin name in messages (default setting)

All options may be specified on the command line with a `--` prefix,
or can be placed in your flake8 config file.


## Error Codes

| Code   | Message |
|--------|---------|
| PAE001 | Remove quotes from variable type annotation 'type'
| PAE002 | Remove quotes from argument type annotation 'type'
| PAE003 | Remove quotes from return type annotation 'type'


## Examples

```
x: 'Foo'  <-- PAE001
def foo(x: 'Foo') -> None:  <-- PAE002
def foo(x: Foo) -> 'Bar':  <-- PAE003
```

