youtype / mypy_boto3_builder

Type annotations builder for boto3 compatible with VSCode, PyCharm, Emacs, Sublime Text, pyright and mypy.
https://youtype.github.io/mypy_boto3_builder/
MIT License
518 stars 35 forks source link

Session.get_credentials can return None #234

Closed aripollak closed 8 months ago

aripollak commented 8 months ago

Notes

This changes the type of Session.get_credentials() to allow returning None, which will happen here if no credentials are configured in the environment.

The aio* equivalents of this method might also be able to get similar changes, but I haven't tested those.

Type of change

Checklist

All of these are optional:

Thank you!

vemel commented 8 months ago

Hello!

Thank you for your contribution. In order to keep compatibility with py37, please use Optional[Credentials] instead of Credentials | None.

vemel commented 8 months ago

LGTM! Thanks again!