diff options
| author | Loek Le Blansch <loek.le-blansch.pv@renesas.com> | 2025-10-24 12:54:01 +0200 |
|---|---|---|
| committer | Loek Le Blansch <loek.le-blansch.pv@renesas.com> | 2025-10-24 12:54:01 +0200 |
| commit | b819354e3d7b2181995ac11510da2226564eebfb (patch) | |
| tree | 76cac0aca3df93b9d9aaad6f94abec65aac73a53 | |
| parent | eb2a636e75fcc47aff26498e8751b403e985cebf (diff) | |
add pre-commit
| -rw-r--r-- | .pre-commit-config.yaml | 13 | ||||
| -rw-r--r-- | patchtree/cli.py | 1 | ||||
| -rw-r--r-- | patchtree/config.py | 1 | ||||
| -rw-r--r-- | patchtree/context.py | 1 | ||||
| -rw-r--r-- | patchtree/diff.py | 1 | ||||
| -rw-r--r-- | patchtree/patch.py | 1 | ||||
| -rw-r--r-- | patchtree/process.py | 1 | ||||
| -rw-r--r-- | pyproject.toml | 1 | ||||
| -rw-r--r-- | readme.md | 2 |
9 files changed, 13 insertions, 9 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..40a64e2 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,13 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace + - id: mixed-line-ending + args: [--fix=lf] + - repo: https://github.com/codespell-project/codespell + rev: v2.4.1 + hooks: + - id: codespell + args: [--quiet-level=2] diff --git a/patchtree/cli.py b/patchtree/cli.py index 8f3a48b..b9cd952 100644 --- a/patchtree/cli.py +++ b/patchtree/cli.py @@ -64,4 +64,3 @@ def main(): if __name__ == "__main__": exit(main()) - diff --git a/patchtree/config.py b/patchtree/config.py index 23849a9..b4772a9 100644 --- a/patchtree/config.py +++ b/patchtree/config.py @@ -54,4 +54,3 @@ class Config: def __post_init__(self): self.processors = {**DEFAULT_PROCESSORS, **self.processors} self.diff_strategies = {**DEFAULT_DIFFS, **self.diff_strategies} - diff --git a/patchtree/context.py b/patchtree/context.py index 207b8c2..993ec64 100644 --- a/patchtree/context.py +++ b/patchtree/context.py @@ -45,4 +45,3 @@ class Context: if not here.exists(): return None return here.read_bytes().decode() - diff --git a/patchtree/diff.py b/patchtree/diff.py index 40a8c1e..5613858 100644 --- a/patchtree/diff.py +++ b/patchtree/diff.py @@ -47,4 +47,3 @@ class IgnoreDiff(Diff): self.content_b = "\n".join((*lines_a, *add_lines,)) return self.compare() - diff --git a/patchtree/patch.py b/patchtree/patch.py index cddf313..cc0c1c6 100644 --- a/patchtree/patch.py +++ b/patchtree/patch.py @@ -74,4 +74,3 @@ class Patch: delta = diff.diff() context.output.write(delta) - diff --git a/patchtree/process.py b/patchtree/process.py index 44082cd..0e86f2e 100644 --- a/patchtree/process.py +++ b/patchtree/process.py @@ -59,4 +59,3 @@ class ProcessCoccinelle(Process): temp_sp.unlink() return content_b - diff --git a/pyproject.toml b/pyproject.toml index 179169b..9097d79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,4 +22,3 @@ Homepage = "https://bitbucket.global.renesas.com/users/loek.le-blansch.pv_renesa [project.scripts] patchtree = "patchtree.cli:main" - @@ -1,3 +1 @@ # patchtree - - |