diff --git a/googleapiclient-stubs/discovery.pyi b/googleapiclient-stubs/discovery.pyi index fedce996..1dcfaaf0 100644 --- a/googleapiclient-stubs/discovery.pyi +++ b/googleapiclient-stubs/discovery.pyi @@ -1,3 +1,4 @@ +import types from email.generator import BytesGenerator from typing import Any, Protocol, TypeVar, overload @@ -520,7 +521,12 @@ class Resource: schema, ) -> None: ... def __enter__(self: T) -> T: ... - def __exit__(self, exc_type, exc, exc_tb) -> None: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc: BaseException | None, + exc_tb: types.TracebackType | None, + ) -> None: ... def close(self) -> None: ... class _RequestBuilder(Protocol): diff --git a/googleapiclient-stubs/discovery_cache/base.pyi b/googleapiclient-stubs/discovery_cache/base.pyi index 5e8895d6..d7df8a95 100644 --- a/googleapiclient-stubs/discovery_cache/base.pyi +++ b/googleapiclient-stubs/discovery_cache/base.pyi @@ -1,9 +1,7 @@ import abc -from _typeshed import Incomplete - class Cache(metaclass=abc.ABCMeta): - __metaclass__: Incomplete + __metaclass__ = abc.ABCMeta @abc.abstractmethod def get(self, url): ... @abc.abstractmethod diff --git a/googleapiclient-stubs/mimeparse.pyi b/googleapiclient-stubs/mimeparse.pyi index 34eb35db..f8a6e78b 100644 --- a/googleapiclient-stubs/mimeparse.pyi +++ b/googleapiclient-stubs/mimeparse.pyi @@ -1,3 +1,4 @@ +__version__: str __credits__: str def parse_mime_type(mime_type): ... diff --git a/googleapiclient-stubs/version.pyi b/googleapiclient-stubs/version.pyi index e69de29b..bda5b5a7 100644 --- a/googleapiclient-stubs/version.pyi +++ b/googleapiclient-stubs/version.pyi @@ -0,0 +1 @@ +__version__: str diff --git a/pyproject.toml b/pyproject.toml index a953d39d..9335ba26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,8 +20,8 @@ google-api-python-client = ">=2.107.0" typing-extensions = ">=3.10.0" [tool.poetry.group.dev.dependencies] -mypy = "^1.0.1" -black = "^23.1.0" +mypy = {version = "^1.7.0", python = "^3.8"} +black = {version = "^23.11.0", python = "^3.8"} isort = {version = "^5.12.0", python = "^3.8"} stubdefaulter = "^0.1.0"