You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
reportPrivateUsage from pyright is not covered by no-access #3659
note that confusingly, reportPrivateUsage actually only really applies to protected members, not private members, which are instead covered by reportAttributeAccessIssue. basedpyright playground
This seems like a good feature. If anyone picks this up: it would likely be worth considering using heuristics to determine when we are in a test, and either disabling the error entirely or using a separate error code; in my experience the use of private attributes in tests is very common.
People trying to be very disciplined will usually avoid it, which is why a separate error code might be the best way to meet users wanting very different levels of safety where they are
Activity
stroxler commentedon Jun 3, 2026
Thanks for the issue.
This seems like a good feature. If anyone picks this up: it would likely be worth considering using heuristics to determine when we are in a test, and either disabling the error entirely or using a separate error code; in my experience the use of private attributes in tests is very common.
People trying to be very disciplined will usually avoid it, which is why a separate error code might be the best way to meet users wanting very different levels of safety where they are
Split protected member diagnostics from no-access (meta#4537)