We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
REDUNDANT_EXPR
1 parent 53d894a commit 9b54ab1Copy full SHA for 9b54ab1
mypy/checker.py
@@ -612,7 +612,8 @@ def accept_loop(
612
# If necessary, reset the modified options and make up for the postponed error checks:
613
if warn_unreachable or warn_redundant:
614
self.options.warn_unreachable = warn_unreachable
615
- self.options.enabled_error_codes.add(codes.REDUNDANT_EXPR)
+ if warn_redundant:
616
+ self.options.enabled_error_codes.add(codes.REDUNDANT_EXPR)
617
with self.binder.frame_context(can_skip=True, break_frame=2, continue_frame=1):
618
self.accept(body)
619
0 commit comments