mass_driver.drivers.counter

Dummy Patch Driver: increments a file counter

Simplest code we could implement that demonstrates PatchDriver capabilities.

Module Contents

Classes

Counter

Increments a counter in a given file of repo, creating if non-existent

API

class mass_driver.drivers.counter.Counter[source]

Bases: mass_driver.drivers.bricks.SingleFileEditor

Increments a counter in a given file of repo, creating if non-existent

target_count: int = None
process_file(file_contents: str) str | mass_driver.models.patchdriver.PatchResult[source]

Process the counter