class documentation

Filter driver that executes external processes.

Method __del__ Clean up the process filter on destruction.
Method __init__ Initialize ProcessFilterDriver.
Method clean Apply clean filter using external process.
Method cleanup Clean up the process filter.
Method reuse Check if this filter driver should be reused with the given configuration.
Method smudge Apply smudge filter using external process.
Instance Variable clean_cmd Undocumented
Instance Variable cwd Undocumented
Instance Variable process_cmd Undocumented
Instance Variable required Undocumented
Instance Variable smudge_cmd Undocumented
Method _get_or_start_process Get or start the long-running process filter.
Method _use_process_filter Use the long-running process filter for the operation.
Instance Variable _capabilities Undocumented
Instance Variable _process Undocumented
Instance Variable _process_lock Undocumented
Instance Variable _protocol Undocumented
def __del__(self):

Clean up the process filter on destruction.

def __init__(self, clean_cmd: str | None = None, smudge_cmd: str | None = None, required: bool = False, cwd: str | None = None, process_cmd: str | None = None):

Initialize ProcessFilterDriver.

Parameters
clean_cmd:str | NoneCommand to run for clean filter
smudge_cmd:str | NoneCommand to run for smudge filter
required:boolWhether the filter is required
cwd:str | NoneWorking directory for filter execution
process_cmd:str | NoneCommand to run for process filter (preferred for performance)
def clean(self, data: bytes) -> bytes:

Apply clean filter using external process.

def cleanup(self):

Clean up the process filter.

def reuse(self, config: StackedConfig, filter_name: str) -> bool:

Check if this filter driver should be reused with the given configuration.

def smudge(self, data: bytes, path: bytes = b'') -> bytes:

Apply smudge filter using external process.

clean_cmd =

Undocumented

cwd =

Undocumented

process_cmd =

Undocumented

required =

Undocumented

smudge_cmd =

Undocumented

def _get_or_start_process(self) -> Protocol | None:

Get or start the long-running process filter.

def _use_process_filter(self, data: bytes, operation: str, path: str = '') -> bytes:

Use the long-running process filter for the operation.

_capabilities: set[bytes] =

Undocumented

Undocumented

_process_lock =

Undocumented

_protocol: Protocol | None =

Undocumented