From bb5e9618129a7992f45bdddc5ac7942849d5f4cc Mon Sep 17 00:00:00 2001 From: Thera Pals Date: Thu, 18 Jun 2026 13:57:47 +0200 Subject: [PATCH] [docs] Add that type hinting is unnecessary for test cases --- doc/develop/coding-guidelines.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/develop/coding-guidelines.rst b/doc/develop/coding-guidelines.rst index 7029a05a6f..cd17c148e9 100644 --- a/doc/develop/coding-guidelines.rst +++ b/doc/develop/coding-guidelines.rst @@ -159,8 +159,9 @@ For example, when type information is refined in the docstring. return True -In test classes, it is recommended to have one-line docstring for each test method. For very short and obvious -tests, where the function name explain what all it does, then in such cases, the docstring can be omitted. +In test classes, it is recommended to add a one-line docstring for each test method when it improves clarity. +For very short and obvious tests, where the function name already explains the behavior, the docstring can be omitted. +Because test methods typically only take ``self`` and do not return a value, type hints in the function signature are not required. For e.g. 2.3 the test class should be defined as