From 5c5f3ad412bcd0ea510f5918578ed24325829033 Mon Sep 17 00:00:00 2001 From: James Braza Date: Tue, 6 Feb 2024 16:49:52 -0800 Subject: [PATCH] Docs: adding missing `mutable-override` to section title (#16886) Closes https://github.com/python/mypy/issues/16880 Supercedes https://github.com/python/mypy/pull/16881 --- docs/source/error_code_list2.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/error_code_list2.rst b/docs/source/error_code_list2.rst index 60f870c57db9..c966fe1f7ea6 100644 --- a/docs/source/error_code_list2.rst +++ b/docs/source/error_code_list2.rst @@ -484,11 +484,11 @@ Example: .. _code-mutable-override: -Check that overrides of mutable attributes are safe ---------------------------------------------------- +Check that overrides of mutable attributes are safe [mutable-override] +---------------------------------------------------------------------- -This will enable the check for unsafe overrides of mutable attributes. For -historical reasons, and because this is a relatively common pattern in Python, +`mutable-override` will enable the check for unsafe overrides of mutable attributes. +For historical reasons, and because this is a relatively common pattern in Python, this check is not enabled by default. The example below is unsafe, and will be flagged when this error code is enabled: