Closed TibiIius closed 2 weeks ago
Hi @TibiIius,
It seems like the source code parser doesn't handle the case of multi-line argument declarations. This is not intended behavior. Thank you for raising this issue!
Best, JK
Hi @TibiIius,
This has now been fixed in https://github.com/swansonk14/typed-argument-parser/pull/148. Thank you again for raising this issue!
Best, JK
Imagine the following:
Output:
I'm currently facing this issue when I set defaults based on current environment variables to offer simpler configuration inside a containerized environment. Comments underneath are not getting picked up as help strings in this case unless you place them like in the fourth cast above. In my case, black often enforces linebreaks in these situations. Given its popularity and conventions like PEP 8's maximum line length, addressing this would help users be consistent with coding styles across the whole project and not either lose this super neat functionality or having to place docstring comments in a weird spot.