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
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,42 @@ replacements:
"google-cloud-core >= 2.0.0, <3.0.0",
"grpcio >= 1.59.0, < 2.0.0",
count: 1
- paths: [
"packages/google-cloud-datastore/mypy.ini",
]
before: |-
# Performance: reuse results from previous runs to speed up 'nox'
incremental = True
after: |-
# Performance: reuse results from previous runs to speed up "nox"
incremental = True

[mypy-google.cloud.datastore._app_engine_key_pb2]
ignore_errors = True

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410):
# Remove once this generator bug is fixed
[mypy-google.cloud.datastore_v1.services.datastore.async_client]
ignore_errors = True

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410):
# Remove once this generator bug is fixed
[mypy-google.cloud.datastore_v1.services.datastore.client]
ignore_errors = True
count: 1
- paths: [
"packages/google-cloud-datastore/mypy.ini",
]
before: |
ignore_missing_imports = False

# TODO\(https://github.com/googleapis/gapic-generator-python/issues/2563\):
# Dependencies that historically lacks py.typed markers
\[mypy-google\.iam\.\*\]
ignore_missing_imports = True
after: |
ignore_missing_imports = True
count: 1
- paths: [
"packages/google-cloud-datastore/docs/index.rst",
]
Expand Down
110 changes: 0 additions & 110 deletions mypy.ini

This file was deleted.

3 changes: 3 additions & 0 deletions packages/gapic-generator/gapic/ads-templates/mypy.ini.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[mypy]
python_version = 3.10
namespace_packages = True
7 changes: 0 additions & 7 deletions packages/gapic-generator/gapic/ads-templates/noxfile.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@
{% block content %}

import os
import pathlib

import nox # type: ignore


CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
# Path to the centralized mypy configuration file at the repository root.
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")


# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
# Add tests for Python 3.15 alpha1
# https://peps.python.org/pep-0790/
Expand Down Expand Up @@ -50,7 +44,6 @@ def mypy(session):
session.install('.')
session.run(
'mypy',
f"--config-file={MYPY_CONFIG_FILE}",
{% if api.naming.module_namespace %}
'{{ api.naming.module_namespace[0] }}',
{% else %}
Expand Down
15 changes: 15 additions & 0 deletions packages/gapic-generator/gapic/templates/mypy.ini.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[mypy]
python_version = 3.14
namespace_packages = True
ignore_missing_imports = False

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
# Dependencies that historically lacks py.typed markers
[mypy-google.iam.*]
ignore_missing_imports = True

# Helps mypy navigate the 'google' namespace more reliably in 3.10+
explicit_package_bases = True

# Performance: reuse results from previous runs to speed up 'nox'
incremental = True
3 changes: 0 additions & 3 deletions packages/gapic-generator/gapic/templates/noxfile.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ DEFAULT_PYTHON_VERSION = "3.14"
PREVIEW_PYTHON_VERSION = "3.14"

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
# Path to the centralized mypy configuration file at the repository root.
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")

if (CURRENT_DIRECTORY / "testing").exists():
LOWER_BOUND_CONSTRAINTS_FILE = (
Expand Down Expand Up @@ -103,7 +101,6 @@ def mypy(session):
session.install(".")
session.run(
"mypy",
f"--config-file={MYPY_CONFIG_FILE}",
"-p",
{% if api.naming.module_namespace %}
"{{ api.naming.module_namespace[0] }}",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[mypy]
python_version = 3.14
namespace_packages = True
ignore_missing_imports = False

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
# Dependencies that historically lacks py.typed markers
[mypy-google.iam.*]
ignore_missing_imports = True

# Helps mypy navigate the 'google' namespace more reliably in 3.10+
explicit_package_bases = True

# Performance: reuse results from previous runs to speed up 'nox'
incremental = True
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
PREVIEW_PYTHON_VERSION = "3.14"

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
# Path to the centralized mypy configuration file at the repository root.
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")

if (CURRENT_DIRECTORY / "testing").exists():
LOWER_BOUND_CONSTRAINTS_FILE = (
Expand Down Expand Up @@ -110,7 +108,6 @@ def mypy(session):
session.install(".")
session.run(
"mypy",
f"--config-file={MYPY_CONFIG_FILE}",
"-p",
"google",
"--check-untyped-defs",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[mypy]
python_version = 3.14
namespace_packages = True
ignore_missing_imports = False

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
# Dependencies that historically lacks py.typed markers
[mypy-google.iam.*]
ignore_missing_imports = True

# Helps mypy navigate the 'google' namespace more reliably in 3.10+
explicit_package_bases = True

# Performance: reuse results from previous runs to speed up 'nox'
incremental = True
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
PREVIEW_PYTHON_VERSION = "3.14"

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
# Path to the centralized mypy configuration file at the repository root.
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")

if (CURRENT_DIRECTORY / "testing").exists():
LOWER_BOUND_CONSTRAINTS_FILE = (
Expand Down Expand Up @@ -110,7 +108,6 @@ def mypy(session):
session.install(".")
session.run(
"mypy",
f"--config-file={MYPY_CONFIG_FILE}",
"-p",
"google",
"--check-untyped-defs",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[mypy]
python_version = 3.14
namespace_packages = True
ignore_missing_imports = False

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
# Dependencies that historically lacks py.typed markers
[mypy-google.iam.*]
ignore_missing_imports = True

# Helps mypy navigate the 'google' namespace more reliably in 3.10+
explicit_package_bases = True

# Performance: reuse results from previous runs to speed up 'nox'
incremental = True
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
PREVIEW_PYTHON_VERSION = "3.14"

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
# Path to the centralized mypy configuration file at the repository root.
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")

if (CURRENT_DIRECTORY / "testing").exists():
LOWER_BOUND_CONSTRAINTS_FILE = (
Expand Down Expand Up @@ -110,7 +108,6 @@ def mypy(session):
session.install(".")
session.run(
"mypy",
f"--config-file={MYPY_CONFIG_FILE}",
"-p",
"google",
"--check-untyped-defs",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[mypy]
python_version = 3.14
namespace_packages = True
ignore_missing_imports = False

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
# Dependencies that historically lacks py.typed markers
[mypy-google.iam.*]
ignore_missing_imports = True

# Helps mypy navigate the 'google' namespace more reliably in 3.10+
explicit_package_bases = True

# Performance: reuse results from previous runs to speed up 'nox'
incremental = True
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
PREVIEW_PYTHON_VERSION = "3.14"

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
# Path to the centralized mypy configuration file at the repository root.
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")

if (CURRENT_DIRECTORY / "testing").exists():
LOWER_BOUND_CONSTRAINTS_FILE = (
Expand Down Expand Up @@ -110,7 +108,6 @@ def mypy(session):
session.install(".")
session.run(
"mypy",
f"--config-file={MYPY_CONFIG_FILE}",
"-p",
"google",
"--check-untyped-defs",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[mypy]
python_version = 3.14
namespace_packages = True
ignore_missing_imports = False

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
# Dependencies that historically lacks py.typed markers
[mypy-google.iam.*]
ignore_missing_imports = True

# Helps mypy navigate the 'google' namespace more reliably in 3.10+
explicit_package_bases = True

# Performance: reuse results from previous runs to speed up 'nox'
incremental = True
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
PREVIEW_PYTHON_VERSION = "3.14"

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
# Path to the centralized mypy configuration file at the repository root.
MYPY_CONFIG_FILE = str(CURRENT_DIRECTORY.parent.parent / "mypy.ini")

if (CURRENT_DIRECTORY / "testing").exists():
LOWER_BOUND_CONSTRAINTS_FILE = (
Expand Down Expand Up @@ -110,7 +108,6 @@ def mypy(session):
session.install(".")
session.run(
"mypy",
f"--config-file={MYPY_CONFIG_FILE}",
"-p",
"google",
"--check-untyped-defs",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[mypy]
python_version = 3.14
namespace_packages = True
ignore_missing_imports = False

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2563):
# Dependencies that historically lacks py.typed markers
[mypy-google.iam.*]
ignore_missing_imports = True

# Helps mypy navigate the 'google' namespace more reliably in 3.10+
explicit_package_bases = True

# Performance: reuse results from previous runs to speed up 'nox'
incremental = True
Loading
Loading