-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Generate report (mypy.xml) fails when running mypy in parallel with another job #16630
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
A possible solution can be to change the following in the function os.makedirs(xml_dirs) to os.makedirs(xml_dirs, exist_ok=True) https://github.com/python/mypy/blame/master/mypy/util.py#L320 |
Your fix makes sense, feel free to submit a PR. |
Thanks. Will make a PR tomorrow. |
JelleZijlstra
pushed a commit
that referenced
this issue
Dec 8, 2023
kourbou
pushed a commit
to kourbou/mypy
that referenced
this issue
Dec 11, 2023
kourbou
pushed a commit
to kourbou/mypy
that referenced
this issue
Dec 11, 2023
…thon#16642) This PR replaces explicit `os.path.exists(...)` checks with `os.makedirs(..., exist_ok=True)` where possible. This removes the need for an extra existence check and slightly simplifies the code. This can also prevent race conditions like python#16630.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
In
pyproject.toml
I've configuredmypy
andcoverage
to generate their reports in the same directory:reports
. In Gitlab CI I'm running 2 jobs in parallel to runmypy
andcoverage
. Sometimes themypy
jobs fails.To Reproduce
Run
mypy
andcoverage
in parallel in Gitlab CI.Expected Behavior
Always generate the report in
reports/mypy.xml
.Actual Behavior
Your Environment
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: