Repository navigation
Conversation
mypy prints a lone newline on a clean run. Parsing it line by line passed an empty string to json.loads and raised "type check command did not return JSON". Skip blank lines instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #598
mypy prints a lone newline on a clean run.
run_type_checkerpassed the resulting empty line tojson.loads, which raised "type check command did not return JSON". Blank lines are now skipped for mypy output.Tests added in
tests/test_type_checking.py(mypy invocation faked viasubprocess.run):"\n", exit 0) returns no errors (fails without the fix)Verified:
pytest tests --ignore=tests/e2e446 passed, 3 skipped;ruff checkandruff format --checkclean;mypy src/mutmut/type_checking.pyclean; a realmutmut runwith the mypytype_check_commandabove now completes.tests/e2ewas not run.