Skip to content

Commit c5d5b16

Browse files
committed
Clarify that the private name mangling is intentional
1 parent c6f518b commit c5d5b16

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: git/cmd.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ def __setattr(cls, name: str, value: Any) -> Any:
348348
if not TYPE_CHECKING:
349349
# To preserve static checking for undefined/misspelled attributes while letting
350350
# the methods' bodies be type-checked, these are defined as non-special methods,
351-
# then bound to special names out of view of static type checkers.
351+
# then bound to special names out of view of static type checkers. (The original
352+
# names invoke name mangling (leading "__") to avoid confusion in other scopes.)
352353
__getattribute__ = __getattribute
353354
__setattr__ = __setattr
354355

0 commit comments

Comments
 (0)