python-trio / trio-typing

Type hints for Trio and related projects
Other
27 stars 16 forks source link

Fix typing for trio.abc.HostnameResolver getaddrinfo() and getnameinfo() #65

Closed jacobpbrugh closed 2 years ago

jacobpbrugh commented 2 years ago

trio._socket.getaddrinfo() ensures a hostname is encoded into bytes before passing it as a parameter to trio.abc.HostnameResolver subclass instance overrides of getaddrinfo(). As such we should limit the type of the hostname parameter to bytes only.

trio._socket.getnameinfo() had its return type corrected in #56, and we should update the return type of HostnameResolver.getnameinfo() to match.

trio-bot[bot] commented 2 years ago

Hey @jacobpbrugh, it looks like that was the first time we merged one of your PRs! Thanks so much! :tada: :birthday:

If you want to keep contributing, we'd love to have you. So, I just sent you an invitation to join the python-trio organization on Github! If you accept, then here's what will happen:

If you want to read more, here's the relevant section in our contributing guide.

Alternatively, you're free to decline or ignore the invitation. You'll still be able to contribute as much or as little as you like, and I won't hassle you about joining again. But if you ever change your mind, just let us know and we'll send another invitation. We'd love to have you, but more importantly we want you to do whatever's best for you.

If you have any questions, well... I am just a humble Python script, so I probably can't help. But please do post a comment here, or in our chat, or on our forum, whatever's easiest, and someone will help you out!