Skip to content

Commit

Permalink
PEP 561 CI.
Browse files Browse the repository at this point in the history
This commit resolves spurious continuous integration (CI) errors with
respect to recently supported PEP 561 compliance. Specifically, this
commit ignores the seemingly unreliable exit code returned by the public
mypy.api.run() function. (*Industrious electronic plunderphonics!*)
  • Loading branch information
leycec committed Feb 20, 2021
1 parent 4ee3084 commit ada1508
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions beartype_test/a90_func/pep/test_pep561_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ def test_pep561_mypy() -> None:

# Tuple of all command-line options to be effectively passed to the
# external "mypy" command.
_, mypy_stderr, mypy_status = api.run(MYPY_OPTIONS + MYPY_ARGUMENTS)
_, mypy_stderr, _ = api.run(MYPY_OPTIONS + MYPY_ARGUMENTS)

# Assert "mypy" to have emitted *NO* warnings or errors.
#
# Note that we intentionally do *NOT* assert that call to have exited with
# a successful exit code. Although mypy does exit with success on local
# developer machines, it inexplicably does *NOT* under remote GitHub
# Actions-based continuous integration despite "mypy_stderr" being empty.
# Ergo, we conveniently ignore the former in favour of the latter.
assert not mypy_stderr

# Assert "mypy" to have exited with success.
assert is_success(mypy_status)

0 comments on commit ada1508

Please sign in to comment.