GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add PEP 613 TypeAlias to typing_extensions by east825 · Pull Request #732 · python/typing

Conversation

@east825

@east825 east825 commented Jun 9, 2020

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@east825
Add PEP 613 TypeAlias to typing_extensions
ccc906e
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Jun 9, 2020
gvanrossum
gvanrossum reviewed Jun 11, 2020
View reviewed changes

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for doing this!

I'd like some positive tests (in the py2 and py3 versions) and I have some textual nits, then it's good to go.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread typing_extensions/src_py2/test_typing_extensions.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread typing_extensions/src_py2/typing_extensions.py Outdated

Predicate = Callable[[...], bool] # type: TypeAlias

It's invalid when used anyhow but as in the example above.

@gvanrossum gvanrossum Jun 11, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

anyhow but -> anywhere except

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread typing_extensions/src_py3/typing_extensions.py Outdated

Predicate: TypeAlias = Callable[[...], bool]

It's invalid when used anyhow but as in the example above.

@gvanrossum gvanrossum Jun 11, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

anyhow as -> anywhere except

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread typing_extensions/src_py3/typing_extensions.py Outdated

Predicate: TypeAlias = Callable[[...], bool]

It's invalid when used anyhow but as in the example above.

@gvanrossum gvanrossum Jun 11, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

(again)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread typing_extensions/src_py3/typing_extensions.py Outdated

Predicate: TypeAlias = Callable[[...], bool]

It's invalid when used anyhow but as in the example above.

@gvanrossum gvanrossum Jun 11, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

(ditto)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
east825 added 4 commits June 15, 2020 17:35
@east825
Add positive tests on canonical usage of TypeAlias
37eb9da
@east825
Fix Callable syntax in the example in TypeAlias docstring
3b0f2d2
@east825
Fix wording in TypeAlias docstring
e3a94de
@east825
Fix flake8 errors
d48428d
@east825

east825 commented Jun 15, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Oh, sorry, I missed the notifications.

I've added positive tests and fixed docstrings as suggested. Also, there happened to be a mistake in Callable syntax in the example (shame on me) and a few code style inconsistencies that I overlooked initially.

I pushed everything as individual commits to make the changes more evident as e.g. typeshed contributing guidelines require, let me know if I need to squash them manually.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gvanrossum

gvanrossum commented Jun 15, 2020

Copy link
Copy Markdown
Member

@east825 Please don't squash, we do that when we merge. I am behind on code reviews, ping me later this week.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gvanrossum
gvanrossum approved these changes Jun 16, 2020
View reviewed changes

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks! All good.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

east825 reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@gvanrossum
gvanrossum merged commit 6d287f0 into python:master Jun 16, 2020
@east825
east825 deleted the PEP-613_typing_extensions.TypeAlias branch June 19, 2020 09:49
east825 added a commit to east825/typeshed that referenced this pull request Jun 19, 2020
@east825
Add PEP 613 TypeAlias stub to typing_extensions
050d5a4
At the moment this special marker annotation described in
PEP 613 exists only in typing_extensions module
(see python/typing#732).
@east825 east825 mentioned this pull request Jun 19, 2020
Add PEP 613 TypeAlias stub to typing_extensions python/typeshed#4243
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gvanrossum gvanrossum gvanrossum approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA signed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@east825 @gvanrossum @the-knights-who-say-ni
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.