Skip to content
  • Iustin Pop's avatar
    Fix decorator uses which crash newer pylint · fc3f75dd
    Iustin Pop authored
    
    
    Pylint version:
    
      pylint 0.25.1,
      astng 0.23.1, common 0.58.0
    
    crashes when passing the fully-qualified decorator name with:
    
      File "/usr/lib/pymodules/python2.7/pylint/checkers/base.py", line 161, in visit_function
        if not redefined_by_decorator(node):
      File "/usr/lib/pymodules/python2.7/pylint/checkers/base.py", line 116, in redefined_by_decorator
        decorator.expr.name == node.name):
    AttributeError: 'Getattr' object has no attribute 'name'
    
    I found out that simply using a shortened name will 'fix' this issue,
    so let's do this to allow running newer pylint versions.
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
    fc3f75dd