https://github.com/patrick91/mypy-lazy-types-example
https://github.com/patrick91/mypy-lazy-types-example
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/patrick91/mypy-lazy-types-example
- Owner: patrick91
- Created: 2020-07-24T09:03:47.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-24T09:08:16.000Z (almost 6 years ago)
- Last Synced: 2025-01-22T03:33:42.825Z (over 1 year ago)
- Language: Python
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example of using Annotated to fetch the actual type at runtime
## Installation
```sh
poetry install
```
## Python
```sh
poetry run python main.py
```
Result (correct):
```
```
## MyPy
```sh
poetry run mypy main.py
```
Output (incorrect, or at least undesired):
```
app/type_b.py:9: error: Name 'app' is not defined
Found 1 error in 1 file (checked 1 source file)
```