mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Write some tests that enforce that disabled_error_codes and enabled_error_codes do not affect program behavior

Open wyattscarpenter opened this issue 1 month ago • 0 comments

While disabled_error_codes and enabled_error_codes are internal fields in the options class, they cannot be set externally, unlike their peers. These tests ensure this intended behavior is maintained. Closes https://github.com/python/mypy/issues/12394, which failed to understand this.

Some of these tests have to be in cmdline.test because they error so badly that they break check-flags.test (they exit with 2 and print to stderr instead, which apparently check-flags.test can't handle; cf https://github.com/python/mypy/issues/19554).

wyattscarpenter avatar Dec 11 '25 03:12 wyattscarpenter