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 checker cannot see any attributes of retry.py #649

Open
2 of 8 tasks
kojiromike opened this issue May 3, 2024 · 0 comments
Open
2 of 8 tasks

type checker cannot see any attributes of retry.py #649

kojiromike opened this issue May 3, 2024 · 0 comments

Comments

@kojiromike
Copy link

  • This is actually a bug report.
  • I am not getting good LLM Results
  • I have tried asking for help in the community on discord or discussions and have not received a response.
  • I have tried searching the documentation and have not found an answer.

What Model are you using?

  • gpt-3.5-turbo
  • gpt-4-turbo
  • gpt-4
  • Other (please specify)

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:

from instructor.retry import InstructorRetryException

and type check it with mypy in an environment with instructor installed, mypy complains:

error: Module "instructor.retry" has no attribute "InstructorRetryException"  [attr-defined]

Expected behavior
Since instructor ships with a PEP 561 py.typed file, I expected type checking to be largely correct across the package.

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

No branches or pull requests

1 participant