Skip to content

Commit 7e0beba

Browse files
MarkDaoustcopybara-github
authored andcommitted
chore: Move mypy config into pyproject.toml for a more modern setup.
PiperOrigin-RevId: 820532696
1 parent 78af921 commit 7e0beba

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
pip install -r requirements.txt
3434
3535
- name: Run mypy ${{ matrix.python-version }}
36-
run: mypy google/genai/ --strict --config-file=google/genai/mypy.ini
36+
run: mypy google/genai/

google/genai/mypy.ini

Lines changed: 0 additions & 7 deletions
This file was deleted.

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,12 @@ include-package-data = true
5353

5454
[tools.setuptools.package_data]
5555
"google.genai" = ["py.typed"]
56+
57+
[tool.mypy]
58+
exclude = ["tests/", "_test_api_client\\.py"]
59+
plugins = ["pydantic.mypy"]
60+
# we are ignoring 'unused-ignore' because we run mypy on Python 3.9 - 3.13 and
61+
# some errors in _automatic_function_calling_util.py only apply in 3.10+
62+
# 'import-not-found' and 'import-untyped' are environment specific
63+
disable_error_code = ["import-not-found", "import-untyped", "unused-ignore"]
64+
strict = true

0 commit comments

Comments
 (0)