Skip to content

Commit

Permalink
update dot files (copier update)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniospneto authored and CristianoMafraJunior committed Nov 1, 2024
1 parent abc5107 commit 218416f
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 36 deletions.
5 changes: 3 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.21.1
_commit: v1.24
_src_path: gh:oca/oca-addons-repo-template
additional_ruff_rules: []
ci: GitHub
convert_readme_fragments_to_markdown: false
generate_requirements_txt: true
Expand All @@ -21,5 +22,5 @@ repo_name: l10n-brazil
repo_slug: l10n-brazil
repo_website: https://github.com/OCA/l10n-brazil
use_pyproject_toml: false
use_ruff: false
use_ruff: true

9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ var/
*.egg
*.eggs

# Debian packages
*.deb

# Redhat packages
*.rpm

# MacOS packages
*.dmg

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
Expand Down
40 changes: 6 additions & 34 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repos:
language: fail
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
- repo: https://github.com/oca/maintainer-tools
rev: 9a170331575a265c092ee6b24b845ec508e8ef75
rev: d5fab7ee87fceee858a3d01048c78a548974d935
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
Expand All @@ -60,21 +60,6 @@ repos:
hooks:
- id: oca-checks-odoo-module
- id: oca-checks-po
- repo: https://github.com/myint/autoflake
rev: v1.4
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.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.4.1
hooks:
Expand Down Expand Up @@ -116,19 +101,6 @@ repos:
- id: check-xml
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
hooks:
- id: pyupgrade
args: ["--keep-percent-format"]
- repo: https://github.com/PyCQA/isort
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:
Expand All @@ -139,12 +111,12 @@ repos:
- requirements.txt
- --header
- "# generated from manifests external_dependencies"
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
hooks:
- id: flake8
name: flake8
additional_dependencies: ["flake8-bugbear==21.9.2"]
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/OCA/pylint-odoo
rev: 7.0.5
hooks:
Expand Down
1 change: 1 addition & 0 deletions .pylintrc-mandatory
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

[MASTER]
load-plugins=pylint_odoo
score=n
Expand Down
30 changes: 30 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

target-version = "py38"
fix = true

[lint]
extend-select = [
"B",
"C90",
"E501", # line too long (default 88)
"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

0 comments on commit 218416f

Please sign in to comment.