| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Another approach suggested by @srittau is having _ANY inherit from Any (#14701 (comment)). Any thoughts on which approach is preferable? |
Sorry, something went wrong.
There was a problem hiding this comment.
Open to exploring subclass with Any! Might be better, but only real world code examples I can think of where it matters are a little contrived.
Sorry, something went wrong.
|
|
||
| ANY: _ANY | ||
| # See https://github.com/python/typeshed/issues/14701 | ||
| ANY: Any |
There was a problem hiding this comment.
Do we need class _Any above?
Sorry, something went wrong.
|
if it's a working solution, I think a subclass of Any is preferable, given that: >>> type(ANY) <class 'unittest.mock._ANY'> |
Sorry, something went wrong.
|
LGTM, although we could add some tests to ensure that the problem mentioned in #14701 is fixed. Also, the example from the docs seems worthwhile to add as a test. |
Sorry, something went wrong.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Closes: #14701