nipunn1313 / mypy-protobuf

open source tools to generate mypy stubs from protobufs
Apache License 2.0
654 stars 80 forks source link

Async Stub Annotations #611

Closed artificial-aidan closed 1 month ago

artificial-aidan commented 6 months ago

This was a fun one, I think I've maintained existing behavior, while made it better to use. Initializing with an async channel will now get you the correct type without casting.

I found an issue with the negative tests, there seems to be some ambiguity about the note that mypy is returning, so it intermittently fails

artificial-aidan commented 6 months ago

See https://github.com/nipunn1313/mypy-protobuf/issues/536 for more discussion

artificial-aidan commented 6 months ago

As I always say, the answer is always in github issues

https://github.com/python/mypy/issues/16363

I added --no-incremental to the mypy flags when testing for now.

artificial-aidan commented 2 months ago

@nipunn1313 bumping this back to the top.

nipunn1313 commented 1 month ago

sorry for the delay - I hadn't been focusing on this for a while (I'm unlikely to be highly responsive, but this very-long-wait isn't expected in general - aplogies).

The PR now requires a rebase.

On the whole this looks - great. Some requests. Could you update CHANGELOG.md in the upcoming section? Would also love to have you add yourself to the contributors section of README.md in the PR as well if you are ok with it.

artificial-aidan commented 1 month ago

sorry for the delay - I hadn't been focusing on this for a while (I'm unlikely to be highly responsive, but this very-long-wait isn't expected in general - aplogies).

The PR now requires a rebase.

On the whole this looks - great. Some requests. Could you update CHANGELOG.md in the upcoming section? Would also love to have you add yourself to the contributors section of README.md in the PR as well if you are ok with it.

Rebased, let me know if you want me to squash or clean up any before you merge.

nipunn1313 commented 1 month ago

Ok let's do it! I am probably going to wait a little bit before releasing again (try to get one more fix in)

tmickel commented 1 month ago

Appreciate this one @nipunn1313 and @artificial-aidan! Looks promising for good grpc Python types

artificial-aidan commented 21 hours ago

@nipunn1313 bump for a release?