Add pre-commit hook.

This commit is contained in:
Mikaël Capelle
2025-05-29 11:21:15 +02:00
parent 672c3a1e5a
commit 0acf2159fd
3 changed files with 17 additions and 2 deletions
+1 -1
View File
@@ -2,4 +2,4 @@ root = true
[*.py]
indent_style = space
indent_size = 4
indent_size = 4
+15
View File
@@ -0,0 +1,15 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-case-conflict
ci:
autofix_commit_msg: "[pre-commit.ci] Auto fixes from pre-commit.com hooks."
autofix_prs: true
autoupdate_commit_msg: "[pre-commit.ci] Pre-commit autoupdate."
autoupdate_schedule: quarterly
submodules: false
+1 -1
View File
@@ -83,7 +83,7 @@ class Form43Checker(mobase.IPluginDiagnose):
def __testFile(self, path: str) -> bool:
version = self.__getForm(path)
return version != -1 and version < 44
def __getForm(self, file: str) -> int:
pluginName = Path(file).name
return self.__organizer.pluginList().formVersion(pluginName)