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
That is an interesting question... My initial reaction was "Yes, it should trigger", since it still represents an access on a private API. But I can see why this would be necessary in the ordinary course of business (calling public methods that return opaque private types). So perhaps it should be allowed.
(I kind of feel like such objects should be public, with private interfaces as in, e.g., https://bugs.python.org/issue41592, but recognize that's not within the client's control.)
## Summary
Occasionally, valid code needs to use `argparse._SubParsersAction` in a
type annotation. This isn't great, but it's indicative of the fact that
public interfaces can return private types. If you accessed that private
type via a private interface, then we should be flagging the call site,
rather than the annotation.
Closes#9013.
Should this trigger for type annotations?
The text was updated successfully, but these errors were encountered: