Future-House / paper-qa

High accuracy RAG for answering questions from scientific documents with citations
Apache License 2.0
6.44k stars 617 forks source link

`rate_limited` decorator doesn't pass type checker #706

Open jamesbraza opened 2 days ago

jamesbraza commented 2 days ago

I tried to add --doctest-modules to pytest, but it doesn't work because the rate_limited decorator (from https://github.com/Future-House/paper-qa/pull/520) doesn't pass typeguard.

In that PR we got rate_limited to pass mypy via type: ignore comments, but typeguard is not mypy. We should fix the typing of rate_limited.