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

Add typing to auxiliary classes around Pool #1197

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

DanielNoord
Copy link
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.

@DanielNoord
Copy link
Contributor Author

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

@DanielNoord
Copy link
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?

Copy link
Member

@elprans elprans left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks, @DanielNoord

@elprans elprans merged commit e9bb695 into MagicStack:master Nov 4, 2024
41 checks passed
@DanielNoord DanielNoord deleted the type-pool-auxiliaries branch November 4, 2024 17:38
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