Skip to content

Commit 6179233

Browse files
[IMP] Update repo
1 parent de64413 commit 6179233

6 files changed

Lines changed: 102 additions & 26 deletions

File tree

.copier-answers.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# Do NOT update manually; changes here will be overwritten by Copier
2-
_commit: v1.24
2+
_commit: v1.27
33
_src_path: https://github.com/OCA/oca-addons-repo-template.git
4-
additional_ruff_rules: []
54
ci: GitHub
6-
convert_readme_fragments_to_markdown: true
5+
convert_readme_fragments_to_markdown: false
6+
enable_checklog_odoo: false
77
generate_requirements_txt: true
88
github_check_license: true
9-
github_ci_extra_env: {}
9+
github_ci_extra_env:
10+
PIP_INDEX_URL: https://pypi.org/simple/
1011
github_enable_codecov: true
1112
github_enable_makepot: false
1213
github_enable_stale_action: true
@@ -21,6 +22,6 @@ repo_description: Odoo Account Analytic Related Addons
2122
repo_name: sy-account-analytic
2223
repo_slug: sy-account-analytic
2324
repo_website: https://github.com/sygel-technology/sy-account-analytic
24-
use_pyproject_toml: true
25-
use_ruff: true
25+
use_pyproject_toml: false
26+
use_ruff: false
2627

.flake8

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[flake8]
2+
max-line-length = 88
3+
max-complexity = 16
4+
# B = bugbear
5+
# B9 = bugbear opinionated (incl line length)
6+
select = C,E,F,W,B,B9
7+
# E203: whitespace before ':' (black behaviour)
8+
# E501: flake8 line length (covered by bugbear B950)
9+
# W503: line break before binary operator (black behaviour)
10+
ignore = E203,E501,W503
11+
per-file-ignores=
12+
__init__.py:F401

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ jobs:
4949
POSTGRES_DB: odoo
5050
ports:
5151
- 5432:5432
52+
env:
53+
PIP_INDEX_URL: "https://pypi.org/simple/"
5254
steps:
5355
- uses: actions/checkout@v3
5456
with:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ var/
2525
*.egg
2626
*.eggs
2727

28+
# Windows installers
29+
*.msi
30+
2831
# Debian packages
2932
*.deb
3033

@@ -33,6 +36,7 @@ var/
3336

3437
# MacOS packages
3538
*.dmg
39+
*.pkg
3640

3741
# Installer logs
3842
pip-log.txt

.isort.cfg

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[settings]
2+
; see https://github.com/psf/black
3+
multi_line_output=3
4+
include_trailing_comma=True
5+
force_grid_wrap=0
6+
combine_as_imports=True
7+
use_parentheses=True
8+
line_length=88
9+
known_odoo=odoo
10+
known_odoo_addons=odoo.addons
11+
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
12+
default_section=THIRDPARTY
13+
ensure_newline_before_comments = True

.pre-commit-config.yaml

Lines changed: 64 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exclude: |
55
# Files and folders generated by bots, to avoid loops
66
^setup/|/static/description/index\.html$|
77
# We don't want to mess with tool-generated files
8-
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|
8+
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|^eslint.config.cjs|^prettier.config.cjs|
99
# Maybe reactivate this when all README files include prettier ignore tags?
1010
^README\.md$|
1111
# Library files can have extraneous formatting (even minimized)
@@ -38,10 +38,6 @@ repos:
3838
entry: found a en.po file
3939
language: fail
4040
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
41-
- repo: https://github.com/sbidoul/whool
42-
rev: v0.5
43-
hooks:
44-
- id: whool-init
4541
- repo: https://github.com/oca/maintainer-tools
4642
rev: d5fab7ee87fceee858a3d01048c78a548974d935
4743
hooks:
@@ -57,32 +53,57 @@ repos:
5753
- --repo-name=sy-account-analytic
5854
- --if-source-changed
5955
- --keep-source-digest
60-
- --convert-fragments-to-markdown
61-
- id: oca-gen-external-dependencies
6256
- repo: https://github.com/OCA/odoo-pre-commit-hooks
6357
rev: v0.0.25
6458
hooks:
6559
- id: oca-checks-odoo-module
6660
- id: oca-checks-po
67-
- repo: https://github.com/pre-commit/mirrors-prettier
68-
rev: v2.7.1
61+
args:
62+
- --disable=po-pretty-format
63+
- repo: https://github.com/myint/autoflake
64+
rev: v1.6.1
65+
hooks:
66+
- id: autoflake
67+
args:
68+
- --expand-star-imports
69+
- --ignore-init-module-imports
70+
- --in-place
71+
- --remove-all-unused-imports
72+
- --remove-duplicate-keys
73+
- --remove-unused-variables
74+
- repo: https://github.com/psf/black
75+
rev: 22.8.0
76+
hooks:
77+
- id: black
78+
- repo: local
6979
hooks:
7080
- id: prettier
7181
name: prettier (with plugin-xml)
82+
entry: prettier
83+
args:
84+
- --write
85+
- --list-different
86+
- --ignore-unknown
87+
types: [text]
88+
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
89+
language: node
7290
additional_dependencies:
7391
- "prettier@2.7.1"
7492
- "@prettier/plugin-xml@2.2.0"
75-
args:
76-
- --plugin=@prettier/plugin-xml
77-
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
78-
- repo: https://github.com/pre-commit/mirrors-eslint
79-
rev: v8.24.0
93+
- repo: local
8094
hooks:
8195
- id: eslint
82-
verbose: true
96+
name: eslint
97+
entry: eslint
8398
args:
8499
- --color
85100
- --fix
101+
verbose: true
102+
types: [javascript]
103+
language: node
104+
additional_dependencies:
105+
- "eslint@8.24.0"
106+
- "eslint-plugin-jsdoc@"
86107
- repo: https://github.com/pre-commit/pre-commit-hooks
87108
rev: v4.3.0
88109
hooks:
@@ -105,12 +126,35 @@ repos:
105126
- id: check-xml
106127
- id: mixed-line-ending
107128
args: ["--fix=lf"]
108-
- repo: https://github.com/astral-sh/ruff-pre-commit
109-
rev: v0.1.3
129+
- repo: https://github.com/asottile/pyupgrade
130+
rev: v2.38.2
131+
hooks:
132+
- id: pyupgrade
133+
args: ["--keep-percent-format"]
134+
- repo: https://github.com/PyCQA/isort
135+
rev: 5.12.0
136+
hooks:
137+
- id: isort
138+
name: isort except __init__.py
139+
args:
140+
- --settings=.
141+
exclude: /__init__\.py$
142+
- repo: https://github.com/acsone/setuptools-odoo
143+
rev: 3.1.8
144+
hooks:
145+
- id: setuptools-odoo-make-default
146+
- id: setuptools-odoo-get-requirements
147+
args:
148+
- --output
149+
- requirements.txt
150+
- --header
151+
- "# generated from manifests external_dependencies"
152+
- repo: https://github.com/PyCQA/flake8
153+
rev: 3.9.2
110154
hooks:
111-
- id: ruff
112-
args: [--fix, --exit-non-zero-on-fix]
113-
- id: ruff-format
155+
- id: flake8
156+
name: flake8
157+
additional_dependencies: ["flake8-bugbear==21.9.2"]
114158
- repo: https://github.com/OCA/pylint-odoo
115159
rev: v8.0.19
116160
hooks:

0 commit comments

Comments
 (0)