FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add typing to auxiliary classes around `Pool` by DanielNoord · Pull Request #1197 · MagicStack/asyncpg · GitHub

Add typing to auxiliary classes around Pool - #1197

Merged
elprans merged 2 commits into
MagicStack:masterfrom
DanielNoord:type-pool-auxiliaries
Nov 4, 2024
Merged

Add typing to auxiliary classes around Pool#1197
elprans merged 2 commits into
MagicStack:masterfrom
DanielNoord:type-pool-auxiliaries

Conversation

Copy link
Copy Markdown
Contributor

In an effort to add more type annotations to common interfaces I decided to tackle some of the simpler methods. Also, to familiarise myself with the CI and project.

There is nothing groundbreaking in this PR. It:

  • Adds -> None for functions that are not returning anything
  • Expands one __aexit__ to be the correct full type
  • Types the arguments and attributes of PoolConnectionHolder, PoolConnectionProxyMeta and PoolAcquireContext based on actual usage patterns.

Let me know if there are any questions. I didn't really see any style checking recommendations in the documentation or setup.py so just used what black, ruff and others have decided is the de facto style of "modern" Python code.

Copy link
Copy Markdown
Contributor Author

Removed the stringified annotations based on the review in #1198 as that seems to be the preferred style.

Copy link
Copy Markdown
Contributor Author

@elprans Anything I can do to help get this merged? I don't want to spam you with pull requests but these are relatively trivial to make and there is still many more to make as well.

I'd like to find the most productive way to get these and other pull requests merged. For example, is there anybody else in the MagicStack team that can help review and merge these?

elprans left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM! Thanks, @DanielNoord

elprans merged commit e9bb695 into MagicStack:master Nov 4, 2024
DanielNoord deleted the type-pool-auxiliaries branch November 4, 2024 17:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL