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
544 stars 36 forks source link

dynamo: AttributeBase does not include `name` property #229

Closed fivepapertigers closed 11 months ago

fivepapertigers commented 11 months ago

Describe the bug

AttributeBase and its subclasses do not include the name property in stubs

To Reproduce Steps to reproduce the behavior:

  1. Install boto3-stubs[dynamodb]
  2. Run mypy/pyright on the following code sample
from boto3.dynamodb.conditions import Attr

a = Attr(name="my_field")
a.name
...

Actual output

mypy issue.py
issue.py:4: error: "Attr" has no attribute "name"  [attr-defined]
Found 1 error in 1 file (checked 1 source file)

Expected output

mypy issue.py
Success: no issues found in 1 source file

Additional context Your OS, boto3-stubs installation method, boto3 version, etc.

vemel commented 11 months ago

@fivepapertigers thank you for your contribution. I am going to prepare a new release ASAP.

vemel commented 11 months ago

@fivepapertigers I just released a new version of mypy_boto3_builder, and mypy-boto3-dynamodb 1.28.73 with the fix included.

Please update and let me know if it works as it should. Thank you for the PR again, I added you to the contributors list.