Commit b4cf32f
committed
Apply repo-review MyPy suggestions
MY103: MyPy warn unreachable
Must have `warn_unreachable` (true/false) to pass this check. There are
occasionally false positives (often due to platform or Python version
static checks), so it's okay to set it to false if you need to. But try
it first - it can catch real bugs too.
MY104: MyPy enables ignore-without-code
Must have `"ignore-without-code"` in `enable_error_code = [...]`. This
will force all skips in your project to include the error code, which
makes them more readable, and avoids skipping something unintended.
MY105: MyPy enables redundant-expr
Must have `"redundant-expr"` in `enable_error_code = [...]`. This helps
catch useless lines of code, like checking the same condition twice.
MY106: MyPy enables truthy-bool
Must have `"truthy-bool"` in `enable_error_code = []`. This catches
mistakes in using a value as truthy if it cannot be falsy.1 parent 2b92ca6 commit b4cf32f
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| |||
0 commit comments