Code Monkey home page Code Monkey logo

Comments (2)

boring-cyborg avatar boring-cyborg commented on August 9, 2024

Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

from powertools-lambda-python.

leandrodamascena avatar leandrodamascena commented on August 9, 2024

Hi @JakubSosnovec! Thanks for bringing this question! Strict typing has been on our radar for a long time and we are correcting what is possible every time we release a new version, but this project is not 100% compatible with strict typing and we are investigating how to include it in our roadmap, but we do not have an ETA for that. I'll add this issue to our backlog and see if we can do something specifically for this case.

@heitorlessa would love to hear your thoughts here.

BTW, I'm trying here with mypy 1.4+ and Powertoos 1.25.7 and I get the same error. It seems like something is still unresolved.

❯ pip freeze
aws-lambda-powertools==1.25.7
aws-xray-sdk==2.12.1
boto3==1.34.10
botocore==1.34.10
fastjsonschema==2.19.1
jmespath==0.10.0
mypy==1.4.1
mypy-extensions==1.0.0
python-dateutil==2.8.2
s3transfer==0.10.0
six==1.16.0
tomli==2.0.1
typing-extensions==4.9.0
urllib3==1.26.18
wrapt==1.16.0
from typing import Any
from aws_lambda_powertools.utilities.data_classes import SQSEvent, event_source
from aws_lambda_powertools.utilities.typing import LambdaContext
@event_source(data_class=SQSEvent)
def handler(event: SQSEvent, _context: LambdaContext) -> dict[str, Any]:
    return {}
❯ mypy --strict main.py       
main.py:4: error: Untyped decorator makes function "handler" untyped  [misc]
Found 1 error in 1 file (checked 1 source file)

from powertools-lambda-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.