google-gemini / generative-ai-python

The official Python library for the Google Gemini API
https://pypi.org/project/google-generativeai/
Apache License 2.0
1.46k stars 288 forks source link

[Feature] Generate mypy stubs for google-generativeai package #264

Open thechopkins opened 6 months ago

thechopkins commented 6 months ago

Description of the feature request:

To support mypy type checking, please add support for mypy stubs library.

Example error message:

# File contents:
from google.generativeai.types.safety_types import HarmBlockThreshold, HarmCategory
# Error message
error: Skipping analyzing "google.generativeai.types.safety_types": module is installed, but missing library stubs or py.typed marker  [import-untyped]
note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

What problem are you trying to solve with this feature?

Enable mypy support for the project.

Any other information you'd like to share?

No response

randomsamples commented 5 months ago

Yes please

tsuga commented 3 weeks ago

Yes, this will be much appreciated!

RayyanNafees commented 3 weeks ago

yes please