click-contrib / sphinx-click

A Sphinx plugin to automatically document click-based applications
MIT License
212 stars 57 forks source link

Add typing hints #83

Closed WhyNotHugo closed 2 years ago

WhyNotHugo commented 3 years ago

This is an attempt at add type hints to the codebase.

I'm mostly doing this since I want to better understand some of the helper functions so as to expose a few and make them reusable.

There's still a issues in _format_envvars and _generate_nodes. Both of them take an argument and pass it to a conflicting function.

There's a second commit to this PR which has a change of which I'm not fully sure. That's not a typing change, but an actual logic change. It does work for me, however, I can't really say it's correct. It does remove one typing error.

WhyNotHugo commented 3 years ago

Any feedback for this?

stephenfin commented 3 years ago

I won't get to this before the weekend at the earliest, but thanks for doing this. Will definitely review

stephenfin commented 2 years ago

Done in e31c7278f64a8d667c0fe7628dc37e589b9f2ccf and cdcfa3ecc00a39e565464f141e2420cb592f392c

WhyNotHugo commented 2 years ago

Thanks!