Skip to content

Inconsistent results with from google.cloud.secretmanager #10376

Closed
@egh

Description

@egh

Bug Report

mypy reports an error every other time when importing this library.

To Reproduce

(Write your steps here:)

  1. mkdir test_mypy && cd test_mypy
$ cat <<EOF> Pipfile
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
mypy = "*"

[packages]
google-cloud-secret-manager = "*"

[requires]
python_version = "3.8"
EOF
$ cat <<EOF> foo.py
from google.cloud import secretmanager
EOF
  1. pipenv install --dev
  2. pipenv run mypy .

Expected Behavior

Consistent failure or success.

Actual Behavior

Every other time I get

Success: no issues found in 1 source file

And every other time I get:

foo.py:1: error: Skipping analyzing 'google.cloud': found module but no type hints or library stubs
foo.py:1: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 1 source file)

Your Environment

  • Mypy version used: mypy 0.812
  • Mypy command-line flags: none
  • Mypy configuration options from mypy.ini (and other config files):
  • Python version used: Python 3.8.7 (install via pyenv)
  • Operating system and version: Ubuntu 20.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions