Skip to content

Commit

Permalink
Merge 5d81edc into 6d25916
Browse files Browse the repository at this point in the history
  • Loading branch information
hugosantosred committed Sep 30, 2022
2 parents 6d25916 + 5d81edc commit 6496947
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions pylint_odoo/checkers/no_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,8 @@ def visit_call(self, node):
if (not is_related and isinstance(argument, astroid.Const) and
(index ==
FIELDS_METHOD.get(argument.parent.func.attrname, 0)) and
(argument.value in
[field_name.capitalize(), field_name.title()])):
(argument.value ==
field_name.title())):
self.add_message('attribute-string-redundant', node=node)
if isinstance(argument, astroid.Keyword):
argument_aux = argument.value
Expand All @@ -676,8 +676,7 @@ def visit_call(self, node):
# of variable
elif not is_related and argument.arg == 'string' and \
(isinstance(argument_aux, astroid.Const) and
argument_aux.value in
[field_name.capitalize(), field_name.title()]):
argument_aux.value == field_name.title()):
self.add_message(
'attribute-string-redundant', node=node)
elif (argument.arg in deprecated):
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 @@ -69,7 +69,7 @@
'eval-referenced': 5,
'xml-syntax-error': 2,
'except-pass': 3,
'attribute-string-redundant': 33,
'attribute-string-redundant': 31,
'renamed-field-parameter': 2,
'deprecated-data-xml-node': 5,
'xml-deprecated-tree-attribute': 3,
Expand Down

0 comments on commit 6496947

Please sign in to comment.