pyinvoke / invoke

Pythonic task management & command execution.
http://pyinvoke.org
BSD 2-Clause "Simplified" License
4.41k stars 369 forks source link

Remaining typing tidyup #916

Open Dreamsorcerer opened 1 year ago

Dreamsorcerer commented 1 year ago

Think there's still some good changes here worth including, so just creating a PR with the remaining changes I had.

Will also push my partial typing of tests up later as a separate PR, if it looks like we can work around the awkward nested classes.

kuwv commented 1 year ago

I recommend keeping 'if TYPE_CHECKING' as it reduces chances for circular imports and does not import unneeded modules at runtime.

Dreamsorcerer commented 1 year ago

Yeah, I don't mind too much. I usually find it preferable to have real imports where possible.

Dreamsorcerer commented 1 year ago

Kept one where the module was already imported for another object, have reverted the rest.