ClaytonJY / powertools-type-error-example

Reprex for https://github.com/awslabs/aws-lambda-powertools-python/issues/849

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS Lambda Powertools - Reprex for #849

This is a minimal reprex for issue #849 in the aws-lambda-powertools package.

The only python file is copied from the docs.

The pydantic plugin for mypy is configured via pyproject.toml; everything else is "vanilla".

Steps to reproduce

  1. have a recent version of poetry and a 3.9.* version of python available
  2. clone this repo and cd into it
  3. poetry install to install the deps into an environment
  4. poetry run mypy extending_builtin_models.py

You should see an error like

extending_builtin_models.py:17: error: Incompatible types in assignment (expression has type "Order", base class "EventBridgeModel" defined the type as "Dict[str, Any]")
Found 1 error in 1 file (checked 1 source file)

About

Reprex for https://github.com/awslabs/aws-lambda-powertools-python/issues/849


Languages

Language:Python 100.0%