Merge branch '17-fix-dotfiles' into '17.0'

[FIX] dotfiles for 17.0

See merge request Noviat/Noviat_Generic/accounting-ebics!25
This commit is contained in:
Luc De Meyer 2024-01-26 18:00:59 +00:00
commit 1a922f9f0d
7 changed files with 65 additions and 62 deletions

4
.gitignore vendored
View File

@ -3,6 +3,7 @@ __pycache__/
*.py[cod] *.py[cod]
/.venv /.venv
/.pytest_cache /.pytest_cache
/.ruff_cache
# C extensions # C extensions
*.so *.so
@ -69,3 +70,6 @@ docs/_build/
# Backup files # Backup files
*~ *~
*.swp *.swp
# OCA rules
!static/lib/

View File

@ -10,4 +10,4 @@ known_odoo=odoo
known_odoo_addons=odoo.addons known_odoo_addons=odoo.addons
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
default_section=THIRDPARTY default_section=THIRDPARTY
ensure_newline_before_comments = True ensure_newline_before_comments = True

View File

@ -36,33 +36,23 @@ repos:
entry: found a en.po file entry: found a en.po file
language: fail language: fail
files: '[a-zA-Z0-9_]*/i18n/en\.po$' files: '[a-zA-Z0-9_]*/i18n/en\.po$'
- repo: https://github.com/sbidoul/whool
rev: v0.5
hooks:
- id: whool-init
- repo: https://github.com/oca/maintainer-tools - repo: https://github.com/oca/maintainer-tools
rev: 9a170331575a265c092ee6b24b845ec508e8ef75 rev: f71041f22b8cd68cf7c77b73a14ca8d8cd190a60
hooks: hooks:
# update the NOT INSTALLABLE ADDONS section above # update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons - id: oca-update-pre-commit-excluded-addons
- id: oca-fix-manifest-website - id: oca-fix-manifest-website
args: ["https://www.noviat.com/"] args: ["https://www.noviat.com"]
- id: oca-gen-external-dependencies
- repo: https://github.com/OCA/odoo-pre-commit-hooks - repo: https://github.com/OCA/odoo-pre-commit-hooks
rev: v0.0.25 rev: v0.0.25
hooks: hooks:
- id: oca-checks-odoo-module - id: oca-checks-odoo-module
- id: oca-checks-po - id: oca-checks-po
- repo: https://github.com/myint/autoflake
rev: v1.6.1
hooks:
- id: autoflake
args:
- --expand-star-imports
- --ignore-init-module-imports
- --in-place
- --remove-all-unused-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier - repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1 rev: v2.7.1
hooks: hooks:
@ -104,37 +94,14 @@ repos:
- id: check-xml - id: check-xml
- id: mixed-line-ending - id: mixed-line-ending
args: ["--fix=lf"] args: ["--fix=lf"]
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v2.38.2 rev: v0.1.3
hooks: hooks:
- id: pyupgrade - id: ruff
args: ["--keep-percent-format"] args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/PyCQA/isort - id: ruff-format
rev: 5.12.0
hooks:
- id: isort
name: isort except __init__.py
args:
- --settings=.
exclude: /__init__\.py$
- repo: https://github.com/acsone/setuptools-odoo
rev: 3.1.8
hooks:
- id: setuptools-odoo-make-default
- id: setuptools-odoo-get-requirements
args:
- --output
- requirements.txt
- --header
- "# generated from manifests external_dependencies"
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
name: flake8
additional_dependencies: ["flake8-bugbear==21.9.2"]
- repo: https://github.com/OCA/pylint-odoo - repo: https://github.com/OCA/pylint-odoo
rev: v9.0.4 rev: v8.0.19
hooks: hooks:
- id: pylint_odoo - id: pylint_odoo
name: pylint with optional checks name: pylint with optional checks

View File

@ -1,16 +1,17 @@
[MASTER] [MASTER]
ignore-patterns=["^.*/TODO/.*$"] ignore-patterns=["^.*/TODO/.*$"]
load-plugins=pylint_odoo load-plugins=pylint_odoo
score=n score=n
[ODOOLINT] [ODOOLINT]
# readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" # readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest_required_authors=Noviat manifest-required-authors=Noviat
manifest_required_keys=license manifest-required-keys=license
manifest_deprecated_keys=description,active manifest-deprecated-keys=description,active
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
valid_odoo_versions=17.0 valid-odoo-versions=17.0
[MESSAGES CONTROL] [MESSAGES CONTROL]
disable=all disable=all
@ -41,7 +42,7 @@ enable=anomalous-backslash-in-string,
license-allowed, license-allowed,
manifest-author-string, manifest-author-string,
manifest-deprecated-key, manifest-deprecated-key,
# manifest-required-author, manifest-required-author,
manifest-required-key, manifest-required-key,
manifest-version-format, manifest-version-format,
method-compute, method-compute,

View File

@ -1,15 +1,15 @@
[MASTER] [MASTER]
ignore-patterns=["^.*/TODO/.*$"]
load-plugins=pylint_odoo load-plugins=pylint_odoo
score=n score=n
[ODOOLINT] [ODOOLINT]
# readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" readme-template-url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest_required_authors=Noviat manifest-required-authors=Odoo Community Association (OCA)
manifest_required_keys=license manifest-required-keys=license
manifest_deprecated_keys=description,active manifest-deprecated-keys=description,active
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 license-allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
valid_odoo_versions=17.0 valid-odoo-versions=17.0
[MESSAGES CONTROL] [MESSAGES CONTROL]
disable=all disable=all
@ -33,7 +33,7 @@ enable=anomalous-backslash-in-string,
license-allowed, license-allowed,
manifest-author-string, manifest-author-string,
manifest-deprecated-key, manifest-deprecated-key,
# manifest-required-author, manifest-required-author,
manifest-required-key, manifest-required-key,
manifest-version-format, manifest-version-format,
method-compute, method-compute,

29
.ruff.toml Normal file
View File

@ -0,0 +1,29 @@
target-version = "py310"
fix = true
[lint]
extend-select = [
"B",
"C90",
"I", # isort
"UP", # pyupgrade
]
exclude = ["setup/*"]
[format]
exclude = ["setup/*"]
[per-file-ignores]
"__init__.py" = ["F401", "I001"] # ignore unused and unsorted imports in __init__.py
"__manifest__.py" = ["B018"] # useless expression
[isort]
section-order = ["future", "standard-library", "third-party", "odoo", "odoo-addons", "first-party", "local-folder"]
[isort.sections]
"odoo" = ["odoo"]
"odoo-addons" = ["odoo.addons"]
[mccabe]
max-complexity = 16

View File

@ -1 +1,3 @@
# generated from manifests external_dependencies # generated from manifests external_dependencies
cryptography
fintech