Skip to content

Commit

Permalink
Merge ff55abd into 240d074
Browse files Browse the repository at this point in the history
  • Loading branch information
moylop260 committed May 25, 2022
2 parents 240d074 + ff55abd commit 4e163db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 1 addition & 4 deletions pylint_odoo/checkers/modules_odoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,7 @@ def _check_duplicate_po_message_definition(self):
for entry in po:
if entry.obsolete:
continue
# Using `set` in order to fix false red
# if the same entry has duplicated occurrences
for occurrence in set(entry.occurrences):
duplicated[(hash(entry.msgid), hash(occurrence))].append(entry)
duplicated[hash(entry.msgid)].append(entry)
for entries in duplicated.values():
if len(entries) < 2:
continue
Expand Down
2 changes: 1 addition & 1 deletion pylint_odoo/test/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
'deprecated-openerp-xml-node': 5,
'development-status-allowed': 1,
'duplicate-id-csv': 2,
'duplicate-po-message-definition': 2,
'duplicate-po-message-definition': 3,
'duplicate-xml-fields': 9,
'duplicate-xml-record-id': 2,
'external-request-timeout': 47,
Expand Down
7 changes: 6 additions & 1 deletion pylint_odoo/test_repo/broken_module/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ msgstr ""
"Plural-Forms: \n"

#. module: broken_module
#: model:ir.model.fields,field_description:broken_module.field_description
#: model:ir.model.fields,field_description:broken_module.field_wizard_description
#, python-format
msgid "Branch"
msgstr ""

#. module: broken_module
#: model:ir.model.fields,field_description:broken_module.field_description
#, python-format
msgid "Branch"
msgstr ""

#. module: broken_module
#: model:ir.model.fields,field_description:broken_module.field_wizard_description
#, python-format
Expand Down

0 comments on commit 4e163db

Please sign in to comment.