libvcs
libvcs copied to clipboard
Allow injecting `Executor` class to control how commands are made / ran
trafficstars
Default behavior is the same
Executors:
-
Default:
run()w/ a pass-through to show real time stderr of progress -
subprocess.runpass-through -
SubprocessCommandgenerates functions in dataclasses you can invoke laterRather than immediately running a
SubprocessCommand, you can introspect, pickle it, adjust it, etc.Git(executor=SubprocessCommand) -
Bring your own
If you're not satisfied and don't think a PR will do, create your own executor class.
If you do, you may want to either 1.) override the class's
#run()or 2.) pass arun_fnto override it.