Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement typing_extensions.Any #68

Merged
merged 10 commits into from Aug 30, 2022
Merged

Implement typing_extensions.Any #68

merged 10 commits into from Aug 30, 2022

Conversation

Gobot1234
Copy link
Contributor

Backport from 3.11+ version (also with fix from python/cpython#95987)

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

LGTM, except for the minor flake8 error, but I'd like @hauntsaninja's feedback.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good to me, just had one nit about testing

@@ -160,6 +160,32 @@ def test_exception(self):
assert_never(None)


class AnyTests(BaseTestCase):
class SubclassesAny(Any):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's put this into an actual test case?
Wouldn't hurt to copy over the tests from test_can_subclass in the original PR; I seem to recall there was some trickiness wrt inheritance, so might as well test it.

@Gobot1234 Gobot1234 requested a review from srittau August 30, 2022 16:25
@srittau srittau merged commit 7d1aeea into python:main Aug 30, 2022
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.

None yet

3 participants