Skip to content

Static typing: missing @overload to ensure return type is a str when default_value is set #4113

Closed
@tonnico

Description

@tonnico

Static type checker used

pyright/pylance

AWS Lambda function runtime

3.12

Powertools for AWS Lambda (Python) version

latest

Static type checker info

Expression of type "str | None" cannot be assigned to declared type "str"

Like in #3839 I found some more places for missing overloads.

Code snippet

header_value: str = event.get_header_value("name", "")

Possible Solution

No response

Metadata

Metadata

Assignees

Labels

typingStatic typing definition related issues (mypy, pyright, etc.)

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions