Closed
Description
Static type checker used
pyright/pylance
AWS Lambda function runtime
3.12
Powertools for AWS Lambda (Python) version
latest
Static type checker info
Latest Pylance, latest VS Code, type checking mode strict.
Untyped function decorator obscures type of function
Screenshot:

Code snippet
from aws_lambda_powertools.event_handler import APIGatewayRestResolver
app = APIGatewayRestResolver()
@app.post("/v1/demo")
def demo() -> str:
return "demo"
Possible Solution
return Callable[..., T]
or something like that
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Shipped
Activity
rafrafek commentedon Mar 21, 2024
I think the solution may look similar to this:
leandrodamascena commentedon Mar 21, 2024
Hello @rafrafek! Thanks for opening this issue! I'm planning to review this next week.
heitorlessa commentedon Jun 10, 2024
Adding help wanted label as we were unable to prioritize it. Any PR welcome <3
rafrafek commentedon Nov 20, 2024
Created PR for this, appreciate reviewing it: #5601