8000 [FIX] coding_guidelines: fix the alphabetic orders for the import · odoo/documentation@ce4ed9b · GitHub
[go: up one dir, main page]

Skip to content

Commit ce4ed9b

Browse files
committed
[FIX] coding_guidelines: fix the alphabetic orders for the import
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
1 parent d7c0cdd commit ce4ed9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/contributing/development/coding_guidelines.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ Inside these 3 groups, the imported lines are alphabetically sorted.
425425
from datetime import datetime
426426
# 2 : imports of odoo
427427
import odoo
428-
from odoo import api, fields, models, _ # alphabetically ordered
428+
from odoo import Command, _, api, fields, models # alphabetically ordered
429429
from odoo.tools.safe_eval import safe_eval as eval
430430
# 3 : imports from odoo addons
431431
from odoo.addons.web.controllers.main import login_redirect

0 commit comments

Comments
 (0)
0