KEMBAR78
Add missing fine-grained dependencies when using Type[X] by JukkaL · Pull Request #5607 · python/mypy · GitHub
Skip to content

Conversation

@JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Sep 12, 2018

Now X.__init__ triggers uses of Type[X], since Type[X] is
callable and the signature is derived from X.__init__ (or
__new__).

I also verified that this works end-to-end but I decided not to add a
test case since the existing ones seem to provide enough coverage.

This generates some dependencies that aren't necessary, but they seem
pretty benign.

Now `X.__init__` triggers uses of `Type[X]`, since `Type[X]` is
callable and the signature is derived from `X.__init__` (or
`__new__`).

I also verified that this works end-to-end but I decided not to add a
test case since the existing ones seem to provide enough coverage.

This generates some dependencies that aren't necessary, but they seem
pretty benign.
@JukkaL JukkaL requested a review from ilevkivskyi September 18, 2018 17:05
Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff looks large but this is only due to refactoring (which actually makes sense).

I think the redundant deps will not cause any harm, LGTM.

@ilevkivskyi ilevkivskyi merged commit 88e49e7 into master Sep 19, 2018
@ilevkivskyi ilevkivskyi deleted the fg-type-type branch September 19, 2018 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants