INNER CODE UNIT · Python

ExitCode

snakemake/snakefmt · snakefmt/diff.py:6

class ExitCode(Enum):
    NO_CHANGE = 0
    WOULD_CHANGE = 1
    ERROR = 123


class Diff:
    def __init__(self, compact: bool = True, context_lines: int = 3):
        self.compact = compact
        self.context_lines = context_lines

    @staticmethod
    def _splitlines(string: str) -> List[str]:
        return string.splitlines(keepends=True)

    def compare(self, original: str, new: str) -> str:
        original_lines = self._splitlines(original)
        new_lines = self._splitlines(new)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…