From 870337e75e1173879fad7f620a8f24bea6926f83 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Wed, 15 May 2024 14:31:40 -0400 Subject: [PATCH 1/2] Enable some stricter mypy settings on `Lib/_pyrepl` --- Lib/_pyrepl/mypy.ini | 3 --- 1 file changed, 3 deletions(-) diff --git a/Lib/_pyrepl/mypy.ini b/Lib/_pyrepl/mypy.ini index ecd03094dbf538..2ea3f34535b8a4 100644 --- a/Lib/_pyrepl/mypy.ini +++ b/Lib/_pyrepl/mypy.ini @@ -15,13 +15,10 @@ strict = True # Various stricter settings that we can't yet enable # Try to enable these in the following order: -disallow_any_generics = False disallow_untyped_calls = False disallow_untyped_defs = False check_untyped_defs = False -disable_error_code = return - # Various internal modules that typeshed deliberately doesn't have stubs for: [mypy-_abc.*,_opcode.*,_overlapped.*,_testcapi.*,_testinternalcapi.*,test.*] ignore_missing_imports = True From 208f5fbf211bf979d729451f21be36da7fd76a54 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Wed, 15 May 2024 14:45:12 -0400 Subject: [PATCH 2/2] Add this too --- Lib/_pyrepl/mypy.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/_pyrepl/mypy.ini b/Lib/_pyrepl/mypy.ini index 2ea3f34535b8a4..395f5945ab740b 100644 --- a/Lib/_pyrepl/mypy.ini +++ b/Lib/_pyrepl/mypy.ini @@ -10,7 +10,7 @@ platform = linux pretty = True # Enable most stricter settings -enable_error_code = ignore-without-code +enable_error_code = ignore-without-code,redundant-expr strict = True # Various stricter settings that we can't yet enable