Skip to content

Conversation

@Dreamsorcerer
Copy link
Contributor

These functions are actually bound methods from working_set.

Any differences in the signatures (e.g. Sequence[str] in require() are bugs.

@Dreamsorcerer
Copy link
Contributor Author

Hmm, seems pytype doesn't recognise the working_set declaration on the line before. But, it works fine with Mypy.

Any ideas how to define this in a way compatible with pytype?

Similarly, flake8 is probably ignoring the declaration as there is no assignment operator. I think that's just because the tool was written to lint implementation code, rather than stubs.

@hauntsaninja
Copy link
Collaborator

Unfortunately, I don't think pytype supports bound methods. This came up in #4282 (comment) as well.
You could probably placate flake8 by using x: y = ..., though.

@Dreamsorcerer
Copy link
Contributor Author

Yep, does that mean I need to revert back and just copy/paste the fixed annotations?

@hauntsaninja
Copy link
Collaborator

Yes, although I filed google/pytype#761. @rchen152 is super responsive, so maybe not too long from now it'll work :-)

@Dreamsorcerer
Copy link
Contributor Author

Will close this in the meantime.

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