@@ -272,8 +272,6 @@ def add_invertible_flag(flag: str,
272
272
parser .add_argument ('--find-occurrences' , metavar = 'CLASS.MEMBER' ,
273
273
dest = 'special-opts:find_occurrences' ,
274
274
help = "print out all usages of a class member (experimental)" )
275
- add_invertible_flag ('--strict-boolean' , default = False , strict_flag = True ,
276
- help = 'enable strict boolean checks in conditions' )
277
275
strict_help = "Strict mode. Enables the following flags: {}" .format (
278
276
", " .join (strict_flag_names ))
279
277
parser .add_argument ('--strict' , action = 'store_true' , dest = 'special-opts:strict' ,
@@ -292,6 +290,8 @@ def add_invertible_flag(flag: str,
292
290
# --dump-graph will dump the contents of the graph of SCCs and exit.
293
291
parser .add_argument ('--dump-graph' , action = 'store_true' , help = argparse .SUPPRESS )
294
292
# deprecated options
293
+ add_invertible_flag ('--strict-boolean' , default = False ,
294
+ help = argparse .SUPPRESS )
295
295
parser .add_argument ('-f' , '--dirty-stubs' , action = 'store_true' ,
296
296
dest = 'special-opts:dirty_stubs' ,
297
297
help = argparse .SUPPRESS )
@@ -364,6 +364,9 @@ def add_invertible_flag(flag: str,
364
364
)
365
365
366
366
# Process deprecated options
367
+ if options .strict_boolean :
368
+ print ("Warning: --strict-boolean is deprecated; "
369
+ "see https://github.com/python/mypy/issues/3195" , file = sys .stderr )
367
370
if special_opts .almost_silent :
368
371
print ("Warning: --almost-silent has been replaced by "
369
372
"--follow-imports=errors" , file = sys .stderr )
0 commit comments