Hello,

pylint reports that we are raising NoneType when we are not,
see the attached test case

-- 
Vincent Legoll
"""Test case for pylint bug:
we are never raising None here
"""

import random

def aname():
    """Pylint reports:
    E: 17:aname: Raising NoneType while only classes, instances or string are allowed
    """
    exc = None
    
    if random.choice([True, False]):
        exc = Exception()
    
    if exc:
        raise exc
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to