We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
pyright/pylance
3.9
latest
Not running a static type checker but receiving this error from pyright in my editor
`secret = parameters.get_secret('secret_name', transform='json')` `secret['SECRET']` will cause the following error: Diagnostics: 1. Argument of type "Literal['SECRET']" cannot be assigned to parameter "__key" of type "SupportsIndex | slice" in function "__getitem__" Type "Literal['SECRET']" cannot be assigned to type "SupportsIndex | slice" "Literal['SECRET']" is incompatible with protocol "SupportsIndex" "__index__" is not present "Literal['SECRET']" is incompatible with "slice" [reportArgumentType] 2. No overloads for "__getitem__" match the provided arguments [reportCallIssue] 3. Argument of type "Literal['SECRET']" cannot be assigned to parameter "__key" of type "slice" in function "__getitem__" "Literal['SECRET']" is incompatible with "slice" [reportArgumentType]
### Possible Solution This should be very similar to #3507 where adding overloads for each transform will fix this.
The text was updated successfully, but these errors were encountered:
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.
Sorry, something went wrong.
leandrodamascena
Successfully merging a pull request may close this issue.
Static type checker used
pyright/pylance
AWS Lambda function runtime
3.9
Powertools for AWS Lambda (Python) version
latest
Static type checker info
Not running a static type checker but receiving this error from pyright in my editor
Code snippet
The text was updated successfully, but these errors were encountered: