Skip to content

Commit

Permalink
[FIX] method-NAME: Fix if value is not a string
Browse files Browse the repository at this point in the history
  • Loading branch information
moylop260 committed Dec 26, 2016
1 parent 2370e52 commit e4e85e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pylint_odoo/checkers/no_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import types

import astroid
from six import string_types
from pylint.checkers import BaseChecker, utils
from pylint.interfaces import IAstroidChecker

Expand Down Expand Up @@ -317,8 +318,8 @@ def visit_call(self, node):
if isinstance(argument, astroid.Keyword):
argument_aux = argument.value
if argument.arg in ['compute', 'search', 'inverse'] and \
isinstance(argument.value, astroid.Const) and \
argument_aux.value and \
isinstance(argument_aux, astroid.Const) and \
isinstance(argument_aux.value, string_types) and \
not argument_aux.value.startswith(
'_' + argument.arg + '_'):
self.add_message('method-' + argument.arg,
Expand Down

0 comments on commit e4e85e7

Please sign in to comment.