itamarst / eliot

Eliot: the logging system that tells you *why* it happened
https://eliot.readthedocs.io
Apache License 2.0
1.09k stars 65 forks source link

Type-hint decorator to preserve type-inference on pass-through #501

Closed MartinBernstorff closed 2 months ago

MartinBernstorff commented 2 months ago

I'd love to use eliot while preserving types of the decorated functions! I can volunteer a PR adding generic types. Before I work on it, would that be of interest? :-)

itamarst commented 2 months ago

Yes, I'd love to have that, thank you.

MartinBernstorff commented 2 months ago

Huh, seems pyright already correctly infers the pass-through types! In that case, I don't think typing part of the code-base is a good idea. Apologies about not checking before creating an issue, can't wait to start using eliot 👍