Skip to content

replace re patterns AnyStr with Union[str, unicode] #244

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

Merged
merged 1 commit into from
Jun 3, 2016

Conversation

OrenLeaffer
Copy link
Contributor

The type of the pattern doesn't affect the return type.

@ddfisher
Copy link
Contributor

ddfisher commented Jun 3, 2016

Looks good! Thanks!

@ddfisher ddfisher merged commit 97c6293 into python:master Jun 3, 2016
OrenLeaffer pushed a commit to OrenLeaffer/zulip that referenced this pull request Jun 3, 2016
Had to add some "type: ignore" because the pattern used in match
doesn't affect the type returned. A fix for this issue has been pushed
to typeshed - python/typeshed#244
OrenLeaffer pushed a commit to OrenLeaffer/zulip that referenced this pull request Jun 3, 2016
Had to add some "type: ignore" because the pattern used in match
doesn't affect the type returned. A fix for this issue has been pushed
to typeshed - python/typeshed#244
timabbott pushed a commit to zulip/zulip that referenced this pull request Jun 3, 2016
Had to add some "type: ignore" because the pattern used in match
doesn't affect the type returned. A fix for this issue has been pushed
to typeshed - python/typeshed#244
OrenLeaffer pushed a commit to OrenLeaffer/zulip that referenced this pull request Jun 3, 2016
Had to add some "type: ignore" because the pattern used in match
doesn't affect the type returned. A fix for this issue has been pushed
to typeshed - python/typeshed#244
OrenLeaffer pushed a commit to OrenLeaffer/zulip that referenced this pull request Jun 3, 2016
Had to add some "type: ignore" because the pattern used in match
doesn't affect the type returned. A fix for this issue has been pushed
to typeshed - python/typeshed#244
OrenLeaffer added a commit to OrenLeaffer/zulip that referenced this pull request Jun 3, 2016
Had to add some "type: ignore" because the pattern used in match
doesn't affect the type returned. A fix for this issue has been pushed
to typeshed - python/typeshed#244
OrenLeaffer added a commit to OrenLeaffer/zulip that referenced this pull request Jun 3, 2016
Had to add some "type: ignore" because the pattern used in match
doesn't affect the type returned. A fix for this issue has been pushed
to typeshed - python/typeshed#244
OrenLeaffer added a commit to OrenLeaffer/zulip that referenced this pull request Jun 3, 2016
Had to add some "type: ignore" because the pattern used in match
doesn't affect the type returned. A fix for this issue has been pushed
to typeshed - python/typeshed#244
timabbott pushed a commit to zulip/zulip that referenced this pull request Jun 4, 2016
Had to add some "type: ignore" because the pattern used in match
doesn't affect the type returned. A fix for this issue has been pushed
to typeshed - python/typeshed#244
@ddfisher
Copy link
Contributor

ddfisher commented Jun 4, 2016

I had to roll this back in fb96ee8.

This PR introduced some bugs (it used Pattern[Union[str, unicode]] when it would need to be Union[Pattern[str], Pattern[unicode]]), and - on further discussion - it's unclear if we want to allow this additional flexibility. I'm reverting this PR for now, but we'll revisit this after deciding on the upcoming proposal about how implicit bytes/unicode conversions should be handled when typing Python 2.

TomaszKolek pushed a commit to TomaszKolek/zulip that referenced this pull request Jul 6, 2016
Had to add some "type: ignore" because the pattern used in match
doesn't affect the type returned. A fix for this issue has been pushed
to typeshed - python/typeshed#244
TomaszKolek pushed a commit to TomaszKolek/zulip that referenced this pull request Aug 25, 2016
Had to add some "type: ignore" because the pattern used in match
doesn't affect the type returned. A fix for this issue has been pushed
to typeshed - python/typeshed#244
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