third_party.pylibs.pylint.src/tests/regrtest_data/py3k_errors_and_warnings.py
2019-06-20 10:02:14 +02:00

20 lines
497 B
Python

"""Contains both normal error messages and Python3 porting error messages."""
# pylint: disable=too-few-public-methods
# error: import missing `from __future__ import absolute_import`
import sys
# error: Use raise ErrorClass(args) instead of raise ErrorClass, args.
raise Exception, 1
class Test(object):
"""dummy"""
def __init__(self):
# warning: Calling a dict.iter*() method
{1: 2}.iteritems()
return 42
# error: print statement used
print 'not in python3'