From a325145947ec8be86319c76bfd8d313ba50e59ec Mon Sep 17 00:00:00 2001 From: Shubha Rajan Date: Tue, 8 Jun 2021 23:36:29 -0700 Subject: [PATCH] chore: fix failing type checks --- google/__init__.py | 4 ++-- google/cloud/__init__.py | 4 ++-- google/cloud/sql/connector/__init__.py | 4 ++-- noxfile.py | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/google/__init__.py b/google/__init__.py index 84f8428fc..e2af59075 100644 --- a/google/__init__.py +++ b/google/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Iterable +from typing import List try: import pkg_resources @@ -21,4 +21,4 @@ except ImportError: import pkgutil - __path__: Iterable[str] = pkgutil.extend_path(__path__, __name__) + __path__: List[str] = pkgutil.extend_path(__path__, __name__) diff --git a/google/cloud/__init__.py b/google/cloud/__init__.py index f84631060..05b0b31c6 100644 --- a/google/cloud/__init__.py +++ b/google/cloud/__init__.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from typing import Iterable +from typing import List try: import pkg_resources @@ -20,4 +20,4 @@ except ImportError: import pkgutil - __path__: Iterable[str] = pkgutil.extend_path(__path__, __name__) + __path__: List[str] = pkgutil.extend_path(__path__, __name__) diff --git a/google/cloud/sql/connector/__init__.py b/google/cloud/sql/connector/__init__.py index 0863ba8cc..30bf66a65 100644 --- a/google/cloud/sql/connector/__init__.py +++ b/google/cloud/sql/connector/__init__.py @@ -14,7 +14,7 @@ limitations under the License. """ -from typing import Iterable +from typing import List from .connector import connect from .instance_connection_manager import CloudSQLConnectionError, IPTypes @@ -29,4 +29,4 @@ except ImportError: import pkgutil - __path__: Iterable[str] = pkgutil.extend_path(__path__, __name__) + __path__: List[str] = pkgutil.extend_path(__path__, __name__) diff --git a/noxfile.py b/noxfile.py index d4018d98e..6badb51c0 100644 --- a/noxfile.py +++ b/noxfile.py @@ -33,7 +33,8 @@ def lint(session): serious code quality issues. """ session.install( - "flake8", "flake8-annotations", "black", "mypy", "sqlalchemy-stubs", "twine") + "flake8", "flake8-annotations", "black", "mypy", "sqlalchemy-stubs", + "types-pkg-resources", "types-PyMySQL", "twine") session.install("-r", "requirements.txt") session.run("black", "--check", *BLACK_PATHS) session.run("flake8", "google", "tests")