Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static typing: case_sensitive should only be bool #4127

Closed
Wurstnase opened this issue Apr 12, 2024 · 2 comments · Fixed by #4128
Closed

Static typing: case_sensitive should only be bool #4127

Wurstnase opened this issue Apr 12, 2024 · 2 comments · Fixed by #4128
Assignees
Labels
typing Static typing definition related issues (mypy, pyright, etc.)

Comments

@Wurstnase
Copy link
Contributor

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:
@Wurstnase Wurstnase added triage Pending triage from maintainers typing Static typing definition related issues (mypy, pyright, etc.) labels Apr 12, 2024
@rubenfonseca
Copy link
Contributor

Thank you for opening this! Will look at it after the weekend

@rubenfonseca rubenfonseca removed the triage Pending triage from maintainers label Apr 15, 2024
@rubenfonseca rubenfonseca self-assigned this Apr 15, 2024
@rubenfonseca rubenfonseca moved this from Triage to Working on it in Powertools for AWS Lambda (Python) Apr 15, 2024
@rubenfonseca rubenfonseca linked a pull request Apr 15, 2024 that will close this issue
7 tasks
@github-project-automation github-project-automation bot moved this from Working on it to Coming soon in Powertools for AWS Lambda (Python) Apr 15, 2024
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

@leandrodamascena leandrodamascena moved this from Coming soon to Shipped in Powertools for AWS Lambda (Python) Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typing Static typing definition related issues (mypy, pyright, etc.)
Projects
Status: Shipped
Development

Successfully merging a pull request may close this issue.

2 participants