Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent results with from google.cloud.secretmanager #10376

Closed
egh opened this issue Apr 27, 2021 · 4 comments
Closed

Inconsistent results with from google.cloud.secretmanager #10376

egh opened this issue Apr 27, 2021 · 4 comments
Labels
bug mypy got something wrong

Comments

@egh
Copy link

egh commented Apr 27, 2021

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
@egh egh added the bug mypy got something wrong label Apr 27, 2021
@hauntsaninja
Copy link
Collaborator

Thanks for the report, I assume this is the same as #9852
Not at all ideal, but you can use --no-incremental to work around this

@egh
Copy link
Author

egh commented Apr 27, 2021

Not sure if #10360 is related but I've seen that issue too

@egh
Copy link
Author

egh commented Apr 27, 2021

Thanks for the report, I assume this is the same as #9852
Not at all ideal, but you can use --no-incremental to work around this

Thank you @hauntsaninja ! I searched but didn't see that. That does fix it. Closing.

@hauntsaninja
Copy link
Collaborator

Fixed by #10937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

2 participants