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

version 0.971 not reporting issues that were reported by 0.960 #13235

Closed
SimonSchick opened this issue Jul 25, 2022 · 10 comments
Closed

version 0.971 not reporting issues that were reported by 0.960 #13235

SimonSchick opened this issue Jul 25, 2022 · 10 comments
Labels
bug mypy got something wrong

Comments

@SimonSchick
Copy link

Bug Report

After upgrading to mypy 0.971 I am not longer getting any error messages, I suspect this is related due to virtualenv issues as our CI (that does not use virt envs), DOES surface errors.

To Reproduce

(Write your steps here:)

  1. Setup virtualenv
  2. Run mypy against a specific module
  3. get no errors

Expected Behavior

I expected to get the same errors than on 0.960

Actual Behavior

No errors / issues are reported at all.

Your Environment

  • Mypy version used: 0.971
  • Mypy command-line flags:
  • Mypy configuration options from mypy.ini (and other config files):
[mypy]
python_version = 3.9
warn_redundant_casts = True
warn_unused_ignores = True
mypy_path = typings
show_error_codes = True

[mypy-*]
strict = True
disallow_untyped_calls = True
disallow_untyped_defs = True
check_untyped_defs = True
warn_return_any = True
ignore_missing_imports = True
  • Python version used: 3.9
  • Operating system and version: MacOS Monterey 12.4
@SimonSchick SimonSchick added the bug mypy got something wrong label Jul 25, 2022
@hauntsaninja
Copy link
Collaborator

This isn't enough information to reproduce. Could you try writing a self-contained script that reproduces the error? Your issue may be coming from setting ignore_missing_imports = True

@SimonSchick
Copy link
Author

I understand this is little to go by at this time, I will try to give a good repro but the project I'm dealing with is fairly/large convoluted.

If I cannot come up with a reasonable isolate repro I will attempt to do a bisect to isolate the faulty(?) commit.

@SimonSchick
Copy link
Author

I'm starting to think the issue is #11143

To give some insight:

We currently have a common folder/package in the root directory of our project, we then have multiple aws lambdas/containers defined, the structure looks something like this:

  • common
    • db
      • ...
  • lambdas
    • thing
      • lambda_function.py (imports from common and site packages)

I assume the issue is that mypy is treating common as site-packages and ignores all type issues?

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Aug 12, 2022

That sounds believable (and #11143 was certainly the most problematic change in 0.971). You could confirm the hypothesis by checking the output when using --no-silence-site-packages

@SimonSchick
Copy link
Author

Unfortunately this still doesn't cause the files to be checked.

@SimonSchick
Copy link
Author

We ran a bisect, the culprit is #13162

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Aug 18, 2022

Thanks for running that! The history here is a little complicated. Just to be sure of what's going on, can you provide the results of running on the following commits:

b07018cd0
2004ae023
8428af7e2
8a974e18d
1a1091e9b
2a519c069

(and do let me know if you have any luck making a public repro)

@SimonSchick
Copy link
Author

Apparently the culprit was this vscode setting:

 "terminal.integrated.env.osx": {
    "PYTHONPATH": "."
  },

Setting this variable really messes up mypy.

@erictraut
Copy link

Is there anything actionable in this issue, or can it be closed?

@SimonSchick
Copy link
Author

Only 2h to reply? 😛

The issue no longer occurs, unsure what fixed it but you can consider it fixed.

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

3 participants