-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Mypy issue validating package with directory and -p arg #11234
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
Comments
I am getting a similar crash when using something like Seems to be a bug in reporting related to
|
Also seeing this on I am blocked from using any reports, since my project is a namespace project that has
Traceback:
|
hauntsaninja
added a commit
to hauntsaninja/mypy
that referenced
this issue
Sep 26, 2022
hauntsaninja
added a commit
that referenced
this issue
Sep 27, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
I'm having an issue running mypy on a package with the
-p
argument where the package directory has a subdirectory inside it. I'm receiving the following error with mypy 0.9.10:I tested with the master branch, and the error is the same, but the traceback is different:
Without the -p argument, the command passes with no issue.
Expected Behavior
I'm not too familiar with mypy, but I would expect the code to ignore such directories I think. I'm also not sure why the -p argument would cause this issue, when the code otherwise works normally. When I dug through the traceback a bit, I found this function
mypy/mypy/report.py
Lines 121 to 128 in f98f782
resources
tostubs
, and that fixed the error. Perhaps all directories should be ignored by this skip function (or maybe they shouldn't be passed into it in the first place, not sure)?My Environment
python3.8 -m mypy --txt-report ~/tmp/mypyr_report --install-types --non-interactive --namespace-packages --ignore-missing-imports -p yahoo.contrib.mx3_python_tools --show-traceback
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: