Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@
'.kokoro/**',
],
},
{
description: 'Disable numpy updates for Python < 3.12 (numpy 2.x stubs break mypy there)',
matchPackageNames: [
'numpy',
],
matchCurrentValue: '/^<2$/',
enabled: false,
},
],
customManagers: [
{
Expand Down
11 changes: 10 additions & 1 deletion packages/toolbox-adk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ test = [
"pytest-asyncio==1.4.0",
"pytest-cov==7.1.0",
"pytest-mock==3.15.1",
"numpy<2", # Pinned to <2 to prevent mypy syntax errors on python 3.10 with numpy 2.x stubs,
# numpy 2.x stubs use the Python 3.12 `type` statement; mypy rejects them on older Pythons.
"numpy<2; python_version < '3.12'",
"numpy<3; python_version >= '3.12'",
]

# Tells setuptools that packages are under the 'src' directory
Expand All @@ -65,3 +67,10 @@ profile = "black"
python_version = "3.10"
warn_unused_configs = true
disallow_incomplete_defs = true

[[tool.mypy.overrides]]
# numpy 2.x stubs use the Python 3.12 `type` statement, which mypy rejects
# under python_version = "3.10". Skip analyzing numpy instead of pinning it.
module = ["numpy", "numpy.*"]
follow_imports = "skip"
follow_imports_for_stubs = true
11 changes: 10 additions & 1 deletion packages/toolbox-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ test = [
"google-cloud-storage==3.10.1",
"aioresponses==0.7.8",
"toolbox-core[telemetry]",
"numpy<2", # Pinned to <2 to prevent mypy syntax errors on python 3.10 with numpy 2.x stubs
# numpy 2.x stubs use the Python 3.12 `type` statement; mypy rejects them on older Pythons.
"numpy<2; python_version < '3.12'",
"numpy<3; python_version >= '3.12'",
]
[build-system]
requires = ["setuptools"]
Expand All @@ -77,3 +79,10 @@ profile = "black"
python_version = "3.10"
warn_unused_configs = true
disallow_incomplete_defs = true

[[tool.mypy.overrides]]
# numpy 2.x stubs use the Python 3.12 `type` statement, which mypy rejects
# under python_version = "3.10". Skip analyzing numpy instead of pinning it.
module = ["numpy", "numpy.*"]
follow_imports = "skip"
follow_imports_for_stubs = true
11 changes: 10 additions & 1 deletion packages/toolbox-langchain/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ test = [
"Pillow==12.3.0; python_version >= '3.10'",
"google-cloud-secret-manager==2.28.0",
"google-cloud-storage==3.10.1",
"numpy<2", # Pinned to <2 to prevent mypy syntax errors on python 3.10 with numpy 2.x stubs
# numpy 2.x stubs use the Python 3.12 `type` statement; mypy rejects them on older Pythons.
"numpy<2; python_version < '3.12'",
"numpy<3; python_version >= '3.12'",
]

[build-system]
Expand All @@ -70,3 +72,10 @@ profile = "black"
python_version = "3.10"
warn_unused_configs = true
disallow_incomplete_defs = true

[[tool.mypy.overrides]]
# numpy 2.x stubs use the Python 3.12 `type` statement, which mypy rejects
# under python_version = "3.10". Skip analyzing numpy instead of pinning it.
module = ["numpy", "numpy.*"]
follow_imports = "skip"
follow_imports_for_stubs = true
11 changes: 10 additions & 1 deletion packages/toolbox-llamaindex/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ test = [
"Pillow==12.3.0; python_version >= '3.10'",
"google-cloud-secret-manager==2.28.0",
"google-cloud-storage==3.10.1",
"numpy<2", # Pinned to <2 to prevent mypy syntax errors on python 3.10 with numpy 2.x stubs
# numpy 2.x stubs use the Python 3.12 `type` statement; mypy rejects them on older Pythons.
"numpy<2; python_version < '3.12'",
"numpy<3; python_version >= '3.12'",
]

[build-system]
Expand All @@ -70,3 +72,10 @@ profile = "black"
python_version = "3.10"
warn_unused_configs = true
disallow_incomplete_defs = true

[[tool.mypy.overrides]]
# numpy 2.x stubs use the Python 3.12 `type` statement, which mypy rejects
# under python_version = "3.10". Skip analyzing numpy instead of pinning it.
module = ["numpy", "numpy.*"]
follow_imports = "skip"
follow_imports_for_stubs = true
Loading