4 Commits

Author SHA1 Message Date
jscampucci
b63c4b5335 [CLN] set hardcoded repo name 2025-09-15 12:03:15 +02:00
jscampucci
1d4364b048 [CLN] set repo name from env var 2025-09-15 12:00:10 +02:00
jscampucci
6b36376f6f [CLN] clean workflow folder name 2025-09-15 11:45:31 +02:00
jscampucci
39aef0d942 [ADD] global: add pre-commit process 2025-09-15 11:43:19 +02:00
8 changed files with 36 additions and 29 deletions

View File

@@ -17,4 +17,4 @@ end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = false
trim_trailing_whitespace = false
trim_trailing_whitespace = false

View File

@@ -185,4 +185,4 @@ rules:
requireReturnDescription: false
requireReturnType: false
valid-typeof: warn
yoda: warn
yoda: warn

View File

@@ -15,10 +15,10 @@ jobs:
python-version: "3.11"
- name: Get python version
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
# - uses: actions/cache@v4
# with:
# path: ~/.cache/pre-commit
# key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
@@ -39,4 +39,4 @@ jobs:
echo "Please check-in the following files:"
echo "$newfiles"
exit 1
fi
fi

View File

@@ -44,19 +44,15 @@ repos:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
- id: oca-fix-manifest-website
entry:
bash -c 'oca-fix-manifest-website "https://git.elabore.coop/elabore/$(basename
$(git rev-parse --show-toplevel))"'
args: ["https://github.com/elabore-coop/event-tools"]
- id: oca-gen-addon-readme
entry:
bash -c 'oca-gen-addon-readme
--addons-dir=.
--branch=$(git symbolic-ref
refs/remotes/origin/HEAD | sed "s@^refs/remotes/origin/@@")
--repo-name=$(basename $(git rev-parse --show-toplevel))
--org-name="Elabore"
--if-source-changed --keep-source-digest'
args:
- --addons-dir=.
- --branch=16.0
- --org-name=OCA
- --repo-name=event-tools
- --if-source-changed
- --keep-source-digest
- repo: https://github.com/OCA/odoo-pre-commit-hooks
rev: v0.1.4
hooks:
@@ -147,4 +143,4 @@ repos:
verbose: true
- id: pylint_odoo
args:
- --rcfile=.pylintrc-mandatory
- --rcfile=.pylintrc-mandatory

View File

@@ -5,4 +5,4 @@ printWidth: 88
proseWrap: always
semi: true
trailingComma: "es5"
xmlWhitespaceSensitivity: "strict"
xmlWhitespaceSensitivity: "strict"

View File

@@ -120,4 +120,4 @@ enable=anomalous-backslash-in-string,
[REPORTS]
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
output-format=colorized
reports=no
reports=no

View File

@@ -95,4 +95,4 @@ enable=anomalous-backslash-in-string,
[REPORTS]
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
output-format=colorized
reports=no
reports=no

View File

@@ -6,9 +6,9 @@ fix = true
extend-select = [
"B",
"C90",
"E501", # line too long (default 88)
"I", # isort
"UP", # pyupgrade
"E501", # line too long (default 88)
"I", # isort
"UP", # pyupgrade
]
extend-safe-fixes = ["UP008"]
exclude = ["setup/*"]
@@ -17,11 +17,22 @@ exclude = ["setup/*"]
exclude = ["setup/*"]
[lint.per-file-ignores]
"__init__.py" = ["F401", "I001"] # ignore unused and unsorted imports in __init__.py
"__manifest__.py" = ["B018"] # useless expression
"__init__.py" = [
"F401",
"I001",
] # ignore unused and unsorted imports in __init__.py
"__manifest__.py" = ["B018"] # useless expression
[lint.isort]
section-order = ["future", "standard-library", "third-party", "odoo", "odoo-addons", "first-party", "local-folder"]
section-order = [
"future",
"standard-library",
"third-party",
"odoo",
"odoo-addons",
"first-party",
"local-folder",
]
[lint.isort.sections]
"odoo" = ["odoo"]