Skip to content

Commit 6810987

Browse files
note about the redundant structure
1 parent 03e2e38 commit 6810987

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

mypy/errorcodes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def is_code_or_sub_code_of(
4242
If None is supplied as the first argument, this is always false.
4343
Again, to quote the assert in ErrorCode above, "Nested subcategories are not supported"."""
4444
if possible_child_code is None:
45+
# This check is pretty much entirely just so we can do type-safe property access later.
4546
return False
4647
else:
4748
return possible_parent_code in (possible_child_code, possible_child_code.sub_code_of)

0 commit comments

Comments
 (0)