fitzzftw.patch.protocols

        ---
config:
  height: 300px
  width: 300px

title: protocols
---
classDiagram
  BackupOptions <|-- FtwPatchApplyOptions
  CommonOptions <|-- ArgParsOptions
  DiffCodeOptions <|-- FtwPatchApplyOptions
  FtwPatchApplyOptions <|-- ArgParsOptions
  HunkCompareOptions <|-- DiffCodeOptions
  Protocol <|-- BackupOptions
  Protocol <|-- CommonOptions
  Protocol <|-- DiffCodeOptions
  Protocol <|-- HunkCompareOptions
  Protocol <|-- LineLike
  Protocol <|-- WhitespaceOptions
  WhitespaceOptions <|-- ArgParsOptions
    

Inheritage diagramm for protocols

Structural Protocols and Type Hints

This module defines the structural interfaces (Protocols) used for static type checking and runtime validation throughout the fitzzftw framework.

Core Protocols:

  • LineLike:

    The primary protocol for terminal output. It ensures that an object provides the necessary metadata for semantic coloring.

  • ArgParsOptions & Friends:

    A hierarchy of protocols that define the expected structure for configuration objects, ranging from whitespace rules to backup settings.

Key Features:

Classes

ArgParsOptions

Comprehensive protocol representing all CLI-provided arguments.

BackupOptions

Interface for file backup configuration.

CommonOptions

Global framework options for logging and execution mode.

DiffCodeOptions

Extension of comparison options to include file-level strip counts.

FtwPatchApplyOptions

Combined protocol for the core patch application logic.

HunkCompareOptions

Interface for options governing how hunks are compared during matching.

LineLike

Protocol defining the minimal interface for a line object to be printable.

WhitespaceOptions

Specialized options for whitespace normalization rules.