asyncpg icon indicating copy to clipboard operation
asyncpg copied to clipboard

Complete typing of `connresource`

Open DanielNoord opened this issue 1 year ago • 1 comments

We can actually enable mypy --strict for this module now :)

Typing decorators correctly is notoriously hard and you need some pretty advanced concepts, but this does the trick. I have checked and both pyright and mypy consider this to be the correct type for all call sites to guarded. The rest is pretty straightforward. The changes outside of the module are because mypy --strict doesn't allow calls to untyped functions, which I therefore had to fix.

DanielNoord avatar Oct 30 '24 19:10 DanielNoord

@elprans Same questions here: could you retrigger the CI so this can get merged?

DanielNoord avatar Dec 18 '24 23:12 DanielNoord