[issue41592] Make _SubParsersAction public

2021-10-22 Thread Eric Pederson
Eric Pederson added the comment: Yes - that was the first thing I tried and why I logged the bug. I will log a bug with Pycharm but it still seems like the long term solution is to make _SubParsersAction public since it is used like a public object. I thought that logging the bug here

[issue41592] Make _SubParsersAction public

2021-10-25 Thread Eric Pederson
Eric Pederson added the comment: But is _SubParsersAction really private if there are methods on it that are required to use (add_parser())? -- ___ Python tracker <https://bugs.python.org/issue41

[issue41592] Make _SubParsersAction public

2020-08-19 Thread Eric Pederson
New submission from Eric Pederson : ArgumentParser.add_subparsers() returns a _SubParsersAction. This requires user code using type annotations to use a protected type which causes type checkers like PyCharm to complain. For example: def add_subparser(name: str, subparser