Skip to content
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

Type hints #387

Open
Yrlish opened this issue Nov 10, 2018 · 1 comment
Open

Type hints #387

Yrlish opened this issue Nov 10, 2018 · 1 comment

Comments

@Yrlish
Copy link

Yrlish commented Nov 10, 2018

Hi there!

I would really appreciate if the methods were defined with correct return data type as specified in PEP-484.

This would help with typing hints where the IDE can correctly determine how to help out with the right methods and variables.

Some examples on places I've stumbled into this:

  • create_ppol should type hint Pool
  • Pool.acquire() should type hint Connection
  • Connection.fetch() should type hint list of Record
  • Connection.fetchrow() should type hint Record or None
@elprans
Copy link
Member

elprans commented Nov 28, 2018

@Yrlish PRs are welcome!

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

No branches or pull requests

2 participants