-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
mypy output for submodule differs between invoking on package vs submodule #10956
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
Labels
bug
mypy got something wrong
Comments
Apparently this was introduced in #10579. Adding |
11 tasks
inmantaci
pushed a commit
to inmanta/inmanta-core
that referenced
this issue
Feb 21, 2022
# Description Fixes python/mypy#10956 Thanks @bartv # Self Check: Strike through any lines that are not applicable (`~~line~~`) then check the box - [ ] Attached issue to pull request - [ ] Changelog entry - [ ] Type annotations are present - [ ] Code is clear and sufficiently documented - [ ] No (preventable) type errors (check using make mypy or make mypy-diff) - [ ] Sufficient test cases (reproduces the bug/tests the requested feature) - [ ] Correct, in line with design - [ ] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: ) # Reviewer Checklist: - [ ] Sufficient test cases (reproduces the bug/tests the requested feature) - [ ] Code is clear and sufficiently documented - [ ] Correct, in line with design
inmantaci
pushed a commit
to inmanta/inmanta-core
that referenced
this issue
Feb 21, 2022
# Description Fixes python/mypy#10956 Thanks @bartv # Self Check: Strike through any lines that are not applicable (`~~line~~`) then check the box - [ ] Attached issue to pull request - [ ] Changelog entry - [ ] Type annotations are present - [ ] Code is clear and sufficiently documented - [ ] No (preventable) type errors (check using make mypy or make mypy-diff) - [ ] Sufficient test cases (reproduces the bug/tests the requested feature) - [ ] Correct, in line with design - [ ] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: ) # Reviewer Checklist: - [ ] Sufficient test cases (reproduces the bug/tests the requested feature) - [ ] Code is clear and sufficiently documented - [ ] Correct, in line with design
inmantaci
pushed a commit
to inmanta/inmanta-core
that referenced
this issue
Feb 21, 2022
# Description Fixes python/mypy#10956 Thanks @bartv # Self Check: Strike through any lines that are not applicable (`~~line~~`) then check the box - [ ] Attached issue to pull request - [ ] Changelog entry - [ ] Type annotations are present - [ ] Code is clear and sufficiently documented - [ ] No (preventable) type errors (check using make mypy or make mypy-diff) - [ ] Sufficient test cases (reproduces the bug/tests the requested feature) - [ ] Correct, in line with design - [ ] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: ) # Reviewer Checklist: - [ ] Sufficient test cases (reproduces the bug/tests the requested feature) - [ ] Code is clear and sufficiently documented - [ ] Correct, in line with design
sanderr
added a commit
to inmanta/inmanta-core
that referenced
this issue
Feb 22, 2022
# Description Fixes python/mypy#10956 Thanks @bartv # Self Check: Strike through any lines that are not applicable (`~~line~~`) then check the box - [ ] Attached issue to pull request - [ ] Changelog entry - [ ] Type annotations are present - [ ] Code is clear and sufficiently documented - [ ] No (preventable) type errors (check using make mypy or make mypy-diff) - [ ] Sufficient test cases (reproduces the bug/tests the requested feature) - [ ] Correct, in line with design - [ ] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: ) # Reviewer Checklist: - [ ] Sufficient test cases (reproduces the bug/tests the requested feature) - [ ] Code is clear and sufficiently documented - [ ] Correct, in line with design
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Running mypy against a whole package doesn't always give the same output for one of its modules as running it against that module directly. Specifically some errors are omitted when run against the whole package. #10260 seems to describe a related discrepancy, though the behavior there is more or less the opposite to this one (additionally, it is for a version of mypy that doesn't produce this issue).
To Reproduce
Alas I didn't manage to find a simple reproductive example. Instead I'll have to refer to the project where I encountered the issue.
git clone https://github.com/inmanta/inmanta-core.git
cd inmanta-core && git checkout a49f051a
make install
mypy src/inmanta/ | grep "src/inmanta/module.py"
and compare the output withmypy src/inmanta/module.py
.Expected Behavior
The
src/inmanta/module.py
file contains type errors, as shown bymypy src/inmanta/module.py
. I would expect to see the same errors for the same file, regardless of how it was invoked. Specifically, in this case I would expectmypy src/inmanta/
to detect and report on all type errors insrc/inmanta/module.py
.Actual Behavior
The output of
mypy src/inmanta/
only shows a subset of the errors forsrc/inmanta/module.py
that are shown inmypy src/inmanta/module.py
.Your Environment
mypy src/inmanta
/mypy src/inmanta/module.py
mypy.ini
(and other config files): insetup.cfg
:The text was updated successfully, but these errors were encountered: