Skip to content

models.ResourceModel should be a child class of BaseResourceModel #55

Description

@benbridts

ProgressEvent defines the type of resourceModels as Optional[List[BaseResourceModel]] if ResourceModel is not a subclass of this the typing will not match

Activity

  1. tobywf commented on Nov 23, 2019

    @tobywf
    Contributor

    i thought it was?

    https://github.com/aws-cloudformation/aws-cloudformation-rpdk-python-plugin/blob/9eda207789e9d904a529dff802f5c73addacb2a7/python/rpdk/python/templates/models.py#L38

    mypy seems happy with this, is there any indication it doesn't work? we did have stronger guarantees around types via generics, but some IDEs struggled to auto-complete that (see #44 )

  2. benbridts commented on Nov 23, 2019

    @benbridts
    ContributorAuthor

    This may have been a race condition. In the sense that I generated the code before the type hint refactor was merged (and I didn't update my plugin since).

    I'll close this and reopen the issue if it doesn't work after I updated everything on my side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions