- Mailing Lists
- Contributors
- Pre-commit updates
Archives
- By thread 1419
-
By date
- August 2019 59
- September 2019 118
- October 2019 165
- November 2019 97
- December 2019 35
- January 2020 58
- February 2020 204
- March 2020 121
- April 2020 172
- May 2020 50
- June 2020 158
- July 2020 85
- August 2020 94
- September 2020 193
- October 2020 277
- November 2020 100
- December 2020 159
- January 2021 38
- February 2021 87
- March 2021 146
- April 2021 73
- May 2021 90
- June 2021 86
- July 2021 123
- August 2021 50
- September 2021 68
- October 2021 66
- November 2021 74
- December 2021 75
- January 2022 98
- February 2022 77
- March 2022 68
- April 2022 31
- May 2022 59
- June 2022 87
- July 2022 141
- August 2022 38
- September 2022 73
- October 2022 152
- November 2022 39
- December 2022 50
- January 2023 93
- February 2023 49
- March 2023 106
- April 2023 47
- May 2023 69
- June 2023 92
- July 2023 64
- August 2023 103
- September 2023 91
- October 2023 101
- November 2023 94
- December 2023 46
- January 2024 75
- February 2024 79
- March 2024 104
- April 2024 63
- May 2024 40
- June 2024 160
- July 2024 80
- August 2024 70
- September 2024 62
- October 2024 121
- November 2024 117
- December 2024 89
- January 2025 59
- February 2025 104
- March 2025 96
- April 2025 107
- May 2025 52
- June 2025 72
- July 2025 60
- August 2025 81
- September 2025 124
- October 2025 63
- November 2025 22
Contributors
Pre-commit updates
- .scss/.css
- .js
- .xml (via prettier plugin)
- Others not so common in our codebase: .md, .html, .less, .yaml
- Before you ask, files created or modified by bots are excluded from the reformat.
- Only for v13+
- Your open PRs could get conflicts. Rebase it and fix them as usual.
- Remember to do pre-commit install when you clone a repo.
- JS code might need an update to satisfy the linter.
- You are encouraged to enable eslint, black, prettier and editorconfig plugins in your favourite IDE, as you probably already did with flake8 and pylint. They should work out of the box, although pre-commit is the maximum authority regarding code reformatting because it works exactly the same in all envs.
by Jairo Llopis - 03:01 - 24 Jan 2020
Follow-Ups
-
Re: Pre-commit updates
Hi all,The new configurations have been pushed. Let me know of any issue.Take care,-sbiOn Sat, Mar 7, 2020 at 1:43 PM Stéphane Bidoul <stephane.bidoul@acsone.eu> wrote:Okay folks, after a few weeks of fine tuning we are ready to launch this update.Here is a typical example of what this will do: https://github.com/OCA/queue/commit/ca187a05bbdd4f00870fa13d678c3d9d2f40ea52I just wanted to insist on the fact that all XML files on the 13.0 branches are going to be reformatted.This is for the better, IMO, but if you have major refactorings in progress this may disturb your workflow.So if any PSC want to temporarily opt-out some repos of this update, let me know before Friday March 13th.Best regards,-sbi--On Fri, Jan 24, 2020 at 3:02 PM Jairo Llopis <jairo.llopis@tecnativa.com> wrote:tl;dr: pre-commit is getting updated, expect conflicts in your PRs. XML and JS autoformatting!Hi community.As you might know, for v13 we took a big step forward in our coding standards introducing pre-commit in our workflow, which rewrites all python code in a beautiful-enough fashion.After the work we've done in https://github.com/OCA/maintainer-quality-tools/pull/618, our dear Stéphane Bidoul will soon update the pre-commit configuration and it will enable even more code automatic standardization.In this case, the main change comes from the inclusion of Prettier and ESLint --fix in our pipeline. They will take the job of prettifying code of these files:- .scss/.css
- .js
- .xml (via prettier plugin)
- Others not so common in our codebase: .md, .html, .less, .yaml
- Before you ask, files created or modified by bots are excluded from the reformat.
- Only for v13+
The case for JS is a little bit special in the sense that style changes will be done by Prettier, and AST changes will be done by ESLit, but ESLint still have some linter rules that are not autofixable, and in such case your commit will fail until you satisfy them manually.Given this will produce a big diff commit (just like isort+black did), I took this chance to update some of the tools that we were already using, so there could be a little more diff in python maybe. It shouldn't be too much.We hope this saves you a lot of time and pain when writing these files. Just write ugly & quick code, and pre-commit will handle the rest 😁How does this affect you?Really not much; just:- Your open PRs could get conflicts. Rebase it and fix them as usual.
- Remember to do pre-commit install when you clone a repo.
- JS code might need an update to satisfy the linter.
- You are encouraged to enable eslint, black, prettier and editorconfig plugins in your favourite IDE, as you probably already did with flake8 and pylint. They should work out of the box, although pre-commit is the maximum authority regarding code reformatting because it works exactly the same in all envs.
The change is planned for february 15th, although Stéphane will tell more details in this thread if needed (please) and I'm advancing it for web and website where the change is most interesting.Have a nice day!--Jairo Llopis_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Stéphane Bidoul - 05:10 - 14 Mar 2020 -
Re: Pre-commit updates
Thanks for your hard workOn Mon, 9 Mar 2020, 1:07 pm Jairo Llopis, <jairo.llopis@tecnativa.com> wrote:Thanks a lot!El sáb., 7 mar. 2020 a las 12:47, Stéphane Bidoul (<stephane.bidoul@acsone.eu>) escribió:Okay folks, after a few weeks of fine tuning we are ready to launch this update.Here is a typical example of what this will do: https://github.com/OCA/queue/commit/ca187a05bbdd4f00870fa13d678c3d9d2f40ea52I just wanted to insist on the fact that all XML files on the 13.0 branches are going to be reformatted.This is for the better, IMO, but if you have major refactorings in progress this may disturb your workflow.So if any PSC want to temporarily opt-out some repos of this update, let me know before Friday March 13th.Best regards,-sbi--On Fri, Jan 24, 2020 at 3:02 PM Jairo Llopis <jairo.llopis@tecnativa.com> wrote:tl;dr: pre-commit is getting updated, expect conflicts in your PRs. XML and JS autoformatting!Hi community.As you might know, for v13 we took a big step forward in our coding standards introducing pre-commit in our workflow, which rewrites all python code in a beautiful-enough fashion.After the work we've done in https://github.com/OCA/maintainer-quality-tools/pull/618, our dear Stéphane Bidoul will soon update the pre-commit configuration and it will enable even more code automatic standardization.In this case, the main change comes from the inclusion of Prettier and ESLint --fix in our pipeline. They will take the job of prettifying code of these files:- .scss/.css
- .js
- .xml (via prettier plugin)
- Others not so common in our codebase: .md, .html, .less, .yaml
- Before you ask, files created or modified by bots are excluded from the reformat.
- Only for v13+
The case for JS is a little bit special in the sense that style changes will be done by Prettier, and AST changes will be done by ESLit, but ESLint still have some linter rules that are not autofixable, and in such case your commit will fail until you satisfy them manually.Given this will produce a big diff commit (just like isort+black did), I took this chance to update some of the tools that we were already using, so there could be a little more diff in python maybe. It shouldn't be too much.We hope this saves you a lot of time and pain when writing these files. Just write ugly & quick code, and pre-commit will handle the rest 😁How does this affect you?Really not much; just:- Your open PRs could get conflicts. Rebase it and fix them as usual.
- Remember to do pre-commit install when you clone a repo.
- JS code might need an update to satisfy the linter.
- You are encouraged to enable eslint, black, prettier and editorconfig plugins in your favourite IDE, as you probably already did with flake8 and pylint. They should work out of the box, although pre-commit is the maximum authority regarding code reformatting because it works exactly the same in all envs.
The change is planned for february 15th, although Stéphane will tell more details in this thread if needed (please) and I'm advancing it for web and website where the change is most interesting.Have a nice day!--Jairo Llopis_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
--Jairo Llopis_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by alfadil - 11:26 - 9 Mar 2020 -
Re: Pre-commit updates
Thanks a lot!El sáb., 7 mar. 2020 a las 12:47, Stéphane Bidoul (<stephane.bidoul@acsone.eu>) escribió:Okay folks, after a few weeks of fine tuning we are ready to launch this update.Here is a typical example of what this will do: https://github.com/OCA/queue/commit/ca187a05bbdd4f00870fa13d678c3d9d2f40ea52I just wanted to insist on the fact that all XML files on the 13.0 branches are going to be reformatted.This is for the better, IMO, but if you have major refactorings in progress this may disturb your workflow.So if any PSC want to temporarily opt-out some repos of this update, let me know before Friday March 13th.Best regards,-sbi--On Fri, Jan 24, 2020 at 3:02 PM Jairo Llopis <jairo.llopis@tecnativa.com> wrote:tl;dr: pre-commit is getting updated, expect conflicts in your PRs. XML and JS autoformatting!Hi community.As you might know, for v13 we took a big step forward in our coding standards introducing pre-commit in our workflow, which rewrites all python code in a beautiful-enough fashion.After the work we've done in https://github.com/OCA/maintainer-quality-tools/pull/618, our dear Stéphane Bidoul will soon update the pre-commit configuration and it will enable even more code automatic standardization.In this case, the main change comes from the inclusion of Prettier and ESLint --fix in our pipeline. They will take the job of prettifying code of these files:- .scss/.css
- .js
- .xml (via prettier plugin)
- Others not so common in our codebase: .md, .html, .less, .yaml
- Before you ask, files created or modified by bots are excluded from the reformat.
- Only for v13+
The case for JS is a little bit special in the sense that style changes will be done by Prettier, and AST changes will be done by ESLit, but ESLint still have some linter rules that are not autofixable, and in such case your commit will fail until you satisfy them manually.Given this will produce a big diff commit (just like isort+black did), I took this chance to update some of the tools that we were already using, so there could be a little more diff in python maybe. It shouldn't be too much.We hope this saves you a lot of time and pain when writing these files. Just write ugly & quick code, and pre-commit will handle the rest 😁How does this affect you?Really not much; just:- Your open PRs could get conflicts. Rebase it and fix them as usual.
- Remember to do pre-commit install when you clone a repo.
- JS code might need an update to satisfy the linter.
- You are encouraged to enable eslint, black, prettier and editorconfig plugins in your favourite IDE, as you probably already did with flake8 and pylint. They should work out of the box, although pre-commit is the maximum authority regarding code reformatting because it works exactly the same in all envs.
The change is planned for february 15th, although Stéphane will tell more details in this thread if needed (please) and I'm advancing it for web and website where the change is most interesting.Have a nice day!--Jairo Llopis_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
--Jairo Llopis
by Jairo Llopis - 11:06 - 9 Mar 2020 -
Re: Pre-commit updates
Amazing work, thanks everybody!On Sat, Mar 7, 2020 at 2:46 PM Pedro M. Baeza (Tecnativa) <pedro.baeza@tecnativa.com> wrote:Thank you very much!_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Simone Orsi - 08:36 - 9 Mar 2020 -