Open kojiromike opened 5 months ago
@kojiromike it's in from instructor.exceptions import InstructorRetryException
Aha, thanks! Perhaps this was fixed in #710 three weeks ago and released in 1.3.3 then. I will test.
Unfortunately this is not really fixed. mypy still cannot see any attributes of retry.py, because it still has type: ignore[all]
at the top. The example case is avoidable now because we can (and should) get the exception class from another module, but from instructor.retry import reask_messages
still causes mypy to give an error.
I have edited the example to use reask_messages
instead of InstructorRetryException
.
What Model are you using?
Describe the bug The
type: ignore[all]
comment at the top of retry.py teaches mypy that retry has no attributes at all.To Reproduce When I write a python module with:
and type check it with mypy in an environment with instructor installed, mypy complains:
Expected behavior Since instructor ships with a PEP 561 py.typed file, I expected type checking to be largely correct across the package.