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 annotations #813

Merged
merged 6 commits into from
Apr 2, 2021
Merged

Type annotations #813

merged 6 commits into from
Apr 2, 2021

Conversation

Pliner
Copy link
Member

@Pliner Pliner commented Apr 2, 2021

What do these changes do?

This PR adds type hints for aiopg except aiopg.sa. Due to cyclic dependencies between cursor, connection and transaction, I had to merge three files into one. The same thing is with context managers: due to cyclic dependencies(context managers were very specific) I had to generalise as much as possible _ContextManager and move specific ones closer to their usage.

Related issue number

#314

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

@codecov
Copy link

codecov bot commented Apr 2, 2021

Codecov Report

Merging #813 (3980d99) into master (5e65277) will decrease coverage by 0.09%.
The diff coverage is 96.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #813      +/-   ##
==========================================
- Coverage   93.34%   93.25%   -0.10%     
==========================================
  Files          13       11       -2     
  Lines        1548     1526      -22     
  Branches      179      179              
==========================================
- Hits         1445     1423      -22     
+ Misses         73       72       -1     
- Partials       30       31       +1     
Impacted Files Coverage Δ
aiopg/pool.py 94.46% <85.22%> (-5.54%) ⬇️
aiopg/utils.py 86.36% <91.17%> (+0.74%) ⬆️
aiopg/connection.py 95.81% <99.74%> (+4.41%) ⬆️
aiopg/__init__.py 100.00% <100.00%> (ø)
aiopg/sa/connection.py 88.03% <100.00%> (+0.41%) ⬆️
aiopg/sa/engine.py 99.13% <100.00%> (+<0.01%) ⬆️
aiopg/sa/result.py 90.77% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e65277...3980d99. Read the comment docs.

@Pliner Pliner marked this pull request as ready for review April 2, 2021 09:00
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