You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my understanding, --enable-error-code unreachable should have the same effect as --warn-unreachable. But, instead, it seems to have no effect, and doesn't even produce an error.
$uvx mypy -c "if False: print('hello')"
Success: no issues found in 1 source file
$uvx mypy -c "if False: print('hello')" --warn-unreachable
<string>:1: error: Statement is unreachable [unreachable]
Found 1 error in 1 file (checked 1 source file)
$uvx mypy -c "if False: print('hello')" --enable-error-code unreachable
Success: no issues found in 1 source file
$uvx mypy -c "if False: print('hello')" --enable-error-code unreachable --warn-unreachable
<string>:1: error: Statement is unreachable [unreachable]
Found 1 error in 1 file (checked 1 source file)
$uvx mypy -c "if False: print('hello')" --enable-error-code funnyerrorcodenotreal
usage: mypy [-h] [-v] [-V] [more options; see below]
[-m MODULE] [-p PACKAGE] [-c PROGRAM_TEXT] [files ...]
mypy: error: Invalid error code(s): funnyerrorcodenotreal