diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-03-26 16:45:52 +0200 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-03-26 16:45:52 +0200 |
commit | 8bc29e8aa88b13b4c64e8d83968c8c21320d5757 (patch) | |
tree | 3d48354c14549388dfe47e7c0fb94f31cf07e2f8 /pylint/test/input/func_typecheck_callfunc_assigment.py | |
parent | 65d557e7c1f5e7b224621b6c18aa930b891b8da4 (diff) | |
download | pylint-8bc29e8aa88b13b4c64e8d83968c8c21320d5757.tar.gz |
Try to make the tests compatible with both Python 2 and Python 3.
Diffstat (limited to 'pylint/test/input/func_typecheck_callfunc_assigment.py')
-rw-r--r-- | pylint/test/input/func_typecheck_callfunc_assigment.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pylint/test/input/func_typecheck_callfunc_assigment.py b/pylint/test/input/func_typecheck_callfunc_assigment.py index 0fb1ed4..6ca744b 100644 --- a/pylint/test/input/func_typecheck_callfunc_assigment.py +++ b/pylint/test/input/func_typecheck_callfunc_assigment.py @@ -1,4 +1,4 @@ -# pylint: disable=print-statement + """check assignment to function call where the function doesn't return 'E1111': ('Assigning to function call which doesn\'t return', @@ -9,20 +9,20 @@ infered function returns nothing but None.'), """ -from __future__ import generators -__revision__ = None +from __future__ import generators, print_function + def func_no_return(): """function without return""" - print 'dougloup' + print('dougloup') A = func_no_return() def func_return_none(): """function returning none""" - print 'dougloup' + print('dougloup') return None A = func_return_none() @@ -37,8 +37,8 @@ A = func_implicit_return_none() def func_return_none_and_smth(): """function returning none and something else""" - print 'dougloup' - if __revision__: + print('dougloup') + if 2 or 3: return None return 3 @@ -46,7 +46,7 @@ A = func_return_none_and_smth() def generator(): """no problemo""" - yield __revision__ + yield 2 A = generator() @@ -60,4 +60,4 @@ class Abstract(object): def use_abstract(self): """should not issue E1111""" var = self.abstract_method() - print var + print(var) |