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

Don't ignore errors in files passed on the command line #14060

Merged
merged 4 commits into from Nov 10, 2022

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Nov 10, 2022

#13768 had a bug so that errors were sometimes silenced in files that were under a
directory in sys.path. sys.path sometimes includes the current working directory,
resulting in no errors reported at all. Fix it by always reporting errors if a file was passed
on the command line.

When using import following errors can still be ignored, which is questionable, but
this didn't change recently so I'm not addressing it here.

Fixes #14042.

JukkaL added 4 commits Nov 10, 2022
that were under a directory in `sys.path`, which sometimes includes
the current working directory, resulting in no errors reported at
all.

Fixes #14042.
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@JukkaL JukkaL merged commit 5cc1439 into master Nov 10, 2022
17 checks passed
@JukkaL JukkaL deleted the fix-false-negatives branch Nov 10, 2022
svalentin pushed a commit that referenced this pull request Nov 10, 2022
#13768 had a bug so that errors were sometimes silenced in files that
were under a directory in `sys.path`. `sys.path` sometimes includes the 
current working directory, resulting in no errors reported at all. Fix it by 
always reporting errors if a file was passed on the command line (unless
*explicitly* silenced).

When using import following errors can still be ignored, which is 
questionable, but this didn't change recently so I'm not addressing it 
here.

Fixes #14042.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mypy 0.990 shows no errors when passing source directory as absolute path
2 participants