|
49 | 49 | typecheck_files.remove("check-modules-case.test") |
50 | 50 |
|
51 | 51 |
|
| 52 | +# TODO: Enable strict optional in test cases by default. Remove files here, once test cases are updated |
| 53 | +no_strict_optional_files = { |
| 54 | + "check-abstract.test", |
| 55 | + "check-async-await.test", |
| 56 | + "check-basic.test", |
| 57 | + "check-bound.test", |
| 58 | + "check-classes.test", |
| 59 | + "check-dynamic-typing.test", |
| 60 | + "check-enum.test", |
| 61 | + "check-expressions.test", |
| 62 | + "check-formatting.test", |
| 63 | + "check-functions.test", |
| 64 | + "check-generic-subtyping.test", |
| 65 | + "check-generics.test", |
| 66 | + "check-incremental.test", |
| 67 | + "check-inference-context.test", |
| 68 | + "check-inference.test", |
| 69 | + "check-inline-config.test", |
| 70 | + "check-isinstance.test", |
| 71 | + "check-kwargs.test", |
| 72 | + "check-lists.test", |
| 73 | + "check-literal.test", |
| 74 | + "check-modules.test", |
| 75 | + "check-namedtuple.test", |
| 76 | + "check-newsemanal.test", |
| 77 | + "check-overloading.test", |
| 78 | + "check-plugin-attrs.test", |
| 79 | + "check-protocols.test", |
| 80 | + "check-selftype.test", |
| 81 | + "check-serialize.test", |
| 82 | + "check-statements.test", |
| 83 | + "check-super.test", |
| 84 | + "check-tuples.test", |
| 85 | + "check-type-aliases.test", |
| 86 | + "check-type-checks.test", |
| 87 | + "check-typeddict.test", |
| 88 | + "check-typevar-values.test", |
| 89 | + "check-unions.test", |
| 90 | + "check-varargs.test", |
| 91 | +} |
| 92 | + |
| 93 | + |
52 | 94 | class TypeCheckSuite(DataSuite): |
53 | 95 | files = typecheck_files |
54 | 96 |
|
@@ -121,7 +163,9 @@ def run_case_once( |
121 | 163 | perform_file_operations(operations) |
122 | 164 |
|
123 | 165 | # Parse options after moving files (in case mypy.ini is being moved). |
124 | | - options = parse_options(original_program_text, testcase, incremental_step) |
| 166 | + options = parse_options( |
| 167 | + original_program_text, testcase, incremental_step, no_strict_optional_files |
| 168 | + ) |
125 | 169 | options.use_builtins_fixtures = True |
126 | 170 | if not testcase.name.endswith("_no_incomplete"): |
127 | 171 | options.enable_incomplete_feature = [TYPE_VAR_TUPLE, UNPACK] |
|
0 commit comments