8000 [FIX] coding_guidelines: fix the alphabetic orders for the import by hamo-odoo · Pull Request #11983 · odoo/documentation · GitHub
[go: up one dir, main page]

Skip to content

[FIX] coding_guidelines: fix the alphabetic orders for the import #11983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

hamo-odoo
Copy link
Contributor
@hamo-odoo hamo-odoo commented Feb 7, 2025

In odoo, as we suggest everyone to follow an alphebetic order.

The translator(_), ASCII is 95 and a ASCII value is 97 which '_' < 'a', the translator should be defined first in the import before the api not at the end of the import

This commits adds an example to import static class Command with a Capital alphabet with a ASCII value of C as 67 which will be before than the _
'C' < '_' < 'a'

This order of import should be followed while the import

@robodoo
Copy link
Collaborator
robodoo commented Feb 7, 2025

Pull request status dashboard

@hamo-odoo hamo-odoo force-pushed the 18.0-coding_guidelines-alpha-order-fix-hamo branch from 149e329 to c48c949 Compare February 7, 2025 06:10
@C3POdoo C3POdoo requested a review from a team February 7, 2025 06:11
@hamo-odoo hamo-odoo changed the title [FIX] coding_guidelines: fix the alphabet orders for the import [FIX] coding_guidelines: fix the alphabetic orders for the import Feb 7, 2025
@hamo-odoo hamo-odoo force-pushed the 18.0-coding_guidelines-alpha-order-fix-hamo branch from c48c949 to ce4ed9b Compare February 7, 2025 08:34
@AntoineVDV AntoineVDV removed the request for review from a team February 7, 2025 10:18
@C3POdoo C3POdoo requested a review from a team February 7, 2025 10:19
Copy link
Collaborator
@AntoineVDV AntoineVDV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I agree with the change, especially since IDEs will also follow this order by default, but could you please rebase your branch onto 16.0 and change the PR's target branch to 16.0 too, so that we cover all versions of the documentation?

@hamo-odoo hamo-odoo force-pushed the 18.0-coding_guidelines-alpha-order-fix-hamo branch from ce4ed9b to 5a148d5 Compare February 7, 2025 10:23
@hamo-odoo hamo-odoo changed the base branch from 18.0 to 16.0 February 7, 2025 10:23
@hamo-odoo
Copy link
Contributor Author

@AntoineVDV Done, Re-targeting to 16.0

In odoo, as we suggest everyone to follow an alphebetic order.

The translator(`_`), ASCII is 95 and `a` ASCII value is 97
which '_' < 'a', the translator should be defined first in the
import before the `api` not at the end of the import

This commits adds an example to import static class `Command`
with a Capital alphabet with a ASCII value of `C` as 67
which will be before than the `_`
'C' < '_' < 'a'

This order of import should be followed while the import
@hamo-odoo hamo-odoo force-pushed the 18.0-coding_guidelines-alpha-order-fix-hamo branch from 5a148d5 to 92c7099 Compare February 7, 2025 10:28
@AntoineVDV
Copy link
Collaborator

@robodoo r+

robodoo pushed a commit that referenced this pull request Feb 7, 2025
In odoo, as we suggest everyone to follow an alphebetic order.

The translator(`_`), ASCII is 95 and `a` ASCII value is 97
which '_' < 'a', the translator should be defined first in the
import before the `api` not at the end of the import

This commits adds an example to import static class `Command`
with a Capital alphabet with a ASCII value of `C` as 67
which will be before than the `_`
'C' < '_' < 'a'

This order of import should be followed while the import

closes #11983

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
@robodoo robodoo closed this Feb 7, 2025
@FlorianGilbert
Copy link
Contributor

Hello @AntoineVDV and @hamo-odoo
Not against the change itself, but shouldn't we be more specific then and comment something like # alphabetically (ascii) ordered?

@AntoineVDV
Copy link
Collaborator

Hello @AntoineVDV and @hamo-odoo Not against the change itself, but shouldn't we be more specific then and comment something like # alphabetically (ascii) ordered?

I'm planning on rewriting the whole guidelines soon™, so until then, I merge all change requests that go in the right direction, and I will elaborate further during the rewrite.

@hamo-odoo
Copy link
Contributor Author

Hello @AntoineVDV and @hamo-odoo Not against the change itself, but shouldn't we be more specific then and comment something like # alphabetically (ascii) ordered?

For the reference, I have created the PR- #12951

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0