pyinvoke / invoke

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

[Question] Is it possible to modify how pyinvoke casts/reads input parameters? #912

Open red8888 opened 1 year ago

red8888 commented 1 year ago

I want to automatically cast string params passed to my @tasks with a value of "null" or "Null" to None. Is this possible?

I can add this logic myself of course, but wondering if pyinvoke has any features for this.

I thought about overloading str as well, but maybe there is a feature of pyinvoke that provides hooks into tasks so I can write a sort of middle man function that is executed against the params that does custom stuff?