Correct comment about public functions starting with an underscore. (#22550)

This commit is contained in:
Manuel Jacob
2026-01-13 15:04:19 +01:00
committed by GitHub
parent 6d8f2864c3
commit cb31883c5f

View File

@@ -101,7 +101,7 @@ pub(crate) fn private_member_access(checker: &Checker, expr: &Expr) {
}
}
// Allow some documented private methods, like `os._exit()`.
// Allow some public functions whose names start with an underscore, like `os._exit()`.
if let Some(qualified_name) = semantic.resolve_qualified_name(expr) {
if matches!(qualified_name.segments(), ["os", "_exit"]) {
return;