New GitHub issue #95073 from mallniya:<br>
<hr>
<pre>
**Bug report**
Using `parse_known_args()` in between of `add_argument()` makes those arguments added after invocation of `parse_known_args()` absent from help message. Though argument parsing with parse_args() afterwards works fine.
Example:
```
from argparse import ArgumentParser
if __name__ == '__main__':
PARSER = ArgumentParser()
PARSER.add_argument('-a', default=1)
PARSER.add_argument('-b', default=2)
PARSER.parse_known_args()
PARSER.add_argument('-c', default=3)
ARGS = PARSER.parse_args()
print(ARGS)
```
If executed such script would yield `Namespace(a=1, b=2, c=3)` and if passed arguments are `-a 2 -b 3 -c 4` -- then Namespace also would yield correct `Namespace(a='2', b='3', c='4')`.
If `-h` passed to this code, then following is yielded:
```
usage: test.py [-h] [-a A] [-b B]
options:
-h, --help show this help message and exit
-a A
-b B
```
which obviously omits `-c` argument. If one moves `PARSER.parse_known_args()` one line above, then `-b` argument will be omitted.
**Your environment**
- CPython versions tested on: 3.10.5
- Operating system and architecture: Arch Linux x86_64 5.15.55-1-lts
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/95073">View on GitHub</a>
<p>Labels: type-bug</p>
<p>Assignee: </p>