Skip to content

Commit

Permalink
Use --no-incremental to avoid caching issues
Browse files Browse the repository at this point in the history
Signed-off-by: Aidan Jensen <[email protected]>
  • Loading branch information
artificial-aidan committed May 8, 2024
1 parent cc52d74 commit 501d032
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ for PY_VER in $PY_VER_UNIT_TESTS; do
# Write output to file. Make variant w/ omitted line numbers for easy diffing / CR
PY_VER_MYPY_TARGET=$(echo "$1" | cut -d. -f1-2)
export MYPYPATH=$MYPYPATH:test/generated
mypy --custom-typeshed-dir="$CUSTOM_TYPESHED_DIR" --python-executable="venv_$1/bin/python" --python-version="$PY_VER_MYPY_TARGET" "${@: 2}" > "$MYPY_OUTPUT/mypy_output" || true
# Use --no-incremental to avoid caching issues: https://github.com/python/mypy/issues/16363
mypy --custom-typeshed-dir="$CUSTOM_TYPESHED_DIR" --python-executable="venv_$1/bin/python" --no-incremental --python-version="$PY_VER_MYPY_TARGET" "${@: 2}" > "$MYPY_OUTPUT/mypy_output" || true
cut -d: -f1,3- "$MYPY_OUTPUT/mypy_output" > "$MYPY_OUTPUT/mypy_output.omit_linenos"
}

Expand Down
2 changes: 1 addition & 1 deletion test_negative/output.expected.3.8

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test_negative/output.expected.3.8.omit_linenos
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test_negative/negative.py: error: "_r_None" has no attribute "invalid"; maybe "v
test_negative/negative.py: error: Incompatible types in assignment (expression has type "ValueType", variable has type "str") [assignment]
test_negative/negative.py: error: All overload variants of "DummyServiceStub" require at least one argument [call-overload]
test_negative/negative.py: note: Possible overload variants:
test_negative/negative.py: note: def [_MTVDummyService0 in (UnaryUnaryMultiCallable[DummyRequest, DummyReply], UnaryUnaryMultiCallable[DummyRequest, DummyReply]), _MTVDummyService1 in (UnaryStreamMultiCallable[DummyRequest, DummyReply], UnaryStreamMultiCallable[DummyRequest, DummyReply]), _MTVDummyService2 in (StreamUnaryMultiCallable[DummyRequest, DummyReply], StreamUnaryMultiCallable[DummyRequest, DummyReply]), _MTVDummyService3 in (StreamStreamMultiCallable[DummyRequest, DummyReply], StreamStreamMultiCallable[DummyRequest, DummyReply])] DummyServiceStub(self, channel: Channel) -> DummyServiceStub[UnaryUnaryMultiCallable[DummyRequest, DummyReply], UnaryStreamMultiCallable[DummyRequest, DummyReply], StreamUnaryMultiCallable[DummyRequest, DummyReply], StreamStreamMultiCallable[DummyRequest, DummyReply]]
test_negative/negative.py: note: def [_MTVDummyService0 in (UnaryUnaryMultiCallable[DummyRequest, DummyReply], UnaryUnaryMultiCallable[DummyRequest, DummyReply]), _MTVDummyService1 in (UnaryStreamMultiCallable[DummyRequest, DummyReply], UnaryStreamMultiCallable[DummyRequest, DummyReply]), _MTVDummyService2 in (StreamUnaryMultiCallable[DummyRequest, DummyReply], StreamUnaryMultiCallable[DummyRequest, DummyReply]), _MTVDummyService3 in (StreamStreamMultiCallable[DummyRequest, DummyReply], StreamStreamMultiCallable[DummyRequest, DummyReply])] __init__(self, channel: Channel) -> DummyServiceStub[UnaryUnaryMultiCallable[DummyRequest, DummyReply], UnaryStreamMultiCallable[DummyRequest, DummyReply], StreamUnaryMultiCallable[DummyRequest, DummyReply], StreamStreamMultiCallable[DummyRequest, DummyReply]]
test_negative/negative.py: error: "DummyReply" has no attribute "not_exists" [attr-defined]
test_negative/negative.py: error: "DummyReply" has no attribute "__iter__" (not iterable) [attr-defined]
test_negative/negative.py: error: "DummyReply" has no attribute "not_exists" [attr-defined]
Expand Down

0 comments on commit 501d032

Please sign in to comment.