Skip to content

Static typing: case_sensitive should only be bool #4127

Closed
@tonnico

Description

@tonnico

Static type checker used

mypy (project's standard)

AWS Lambda function runtime

3.12

Powertools for AWS Lambda (Python) version

latest

Static type checker info

It is possible to use get_header_value(headers, name, case_sensitive=None).

Code snippet

def get_header_value(
    headers: dict[str, Any],
    name: str,
    default_value: str | None = None,
    case_sensitive: bool | None= False,
) -> str:

Possible Solution

def get_header_value(
    headers: dict[str, Any],
    name: str,
    default_value: str | None = None,
    case_sensitive: bool = False,
) -> str:

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