mypy_boto3_builder icon indicating copy to clipboard operation
mypy_boto3_builder copied to clipboard

EC2 InstanceTypeDef.Platform Literal incorrectly capitalized

Open andrew-womeldorf opened this issue 6 months ago • 0 comments

Describe the bug EC2 InstanceTypeDef - the Platform field is typed NotRequired[Literal["Windows"]], which is so close to being correct it hurts that it's not 😂

  • AWS Docs indicate that it's windows, not Windows. This matches what we're receiving in practice (the lowercased version).

To Reproduce Steps to reproduce the behavior:

  1. Install boto3-stubs[...]
  2. Run mypy/pyright on the following code sample
from mypy_boto3_ec2.type_defs import InstanceTypeDef
instance: InstanceTypeDef = {"Platform": "windows"}

Actual output

$ poetry run pyright
<path>/main.py
  <path>/main.py:2:42 - error: Expression of type "dict[str, str]" cannot be assigned to declared type "InstanceTypeDef"
    "Literal['windows']" cannot be assigned to type "Literal['Windows']" (reportAssignmentType)
1 error, 0 warnings, 0 informations

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

boto3-stubs 1.34.38

andrew-womeldorf avatar Feb 09 '24 20:02 andrew-womeldorf