Skip to content

redis: Add some type hints#3055

Merged
srittau merged 1 commit intopython:masterfrom
HashBangCoop:bochecha/redis-push-pop
Jun 18, 2019
Merged

redis: Add some type hints#3055
srittau merged 1 commit intopython:masterfrom
HashBangCoop:bochecha/redis-push-pop

Conversation

@bochecha
Copy link
Contributor

Note that I only tested brpop and lpush, but I figured I'd do the other two as well since they are symmetric.

bochecha added a commit to HashBangCoop/mypy that referenced this pull request Jun 13, 2019
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.

Not a thorough review yet, but please note that AnyStr is not an alias for Union[Text, bytes]. If you need something like that, you need to define it yourself or annotate it like this inline. An alias would be useful, since the argument type is used many locations and actually includes some more types, so it can be expanded later.

@bochecha bochecha force-pushed the bochecha/redis-push-pop branch 2 times, most recently from e569ac5 to 7b07a6b Compare June 14, 2019 15:41
bochecha added a commit to HashBangCoop/mypy that referenced this pull request Jun 14, 2019
@bochecha
Copy link
Contributor Author

As discussed on Gitter, I fixed the types for the "string-like" parameters.

@bochecha bochecha force-pushed the bochecha/redis-push-pop branch from 7b07a6b to b917837 Compare June 14, 2019 16:06
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.

Thanks, just one comment.

@bochecha bochecha force-pushed the bochecha/redis-push-pop branch from b917837 to 8b016fe Compare June 18, 2019 16:02
@srittau
Copy link
Collaborator

srittau commented Jun 18, 2019

Will merge when tests pass. Just for future reference: Please don't force-push as it makes it harder to review changes.

@srittau srittau merged commit 38f253e into python:master Jun 18, 2019
@bochecha
Copy link
Contributor Author

Just for future reference: Please don't force-push as it makes it harder to review changes.

Oh, ok. Other projects I contribute to tend to prefer force pushing so the merged history is clean, but I'm happy to adapt. 🙂

Thanks for the review and for the help!

@bochecha bochecha deleted the bochecha/redis-push-pop branch June 18, 2019 18:32
bochecha added a commit to HashBangCoop/mypy that referenced this pull request Jun 24, 2019
I need it for the Redis type stub improvements in master.

python/typeshed#3015
python/typeshed#3016
python/typeshed#3055
bochecha added a commit to HashBangCoop/mypy that referenced this pull request Jun 28, 2019
I need it for the Redis type stub improvements in master.

python/typeshed#3015
python/typeshed#3016
python/typeshed#3055
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