diff options
| author | Omer Katz <omer.drow@gmail.com> | 2015-06-01 13:33:29 +0300 |
|---|---|---|
| committer | Omer Katz <omer.drow@gmail.com> | 2015-06-01 13:33:29 +0300 |
| commit | f3de950bfb19c81cd6430e7244f996bf824584e4 (patch) | |
| tree | e4ae6d18dea26293c1e080920aab7a701da8d395 | |
| parent | 5fdbef8c3617d2c53fd8c56081d40d985e8e406c (diff) | |
| download | astroid-f3de950bfb19c81cd6430e7244f996bf824584e4.tar.gz | |
Fixed syntax errors in Python 3.
7 files changed, 16 insertions, 15 deletions
diff --git a/astroid/tests/testdata/python2/data/SSL1/Connection1.py b/astroid/tests/testdata/python2/data/SSL1/Connection1.py index c0f0152..cba4afb 100644 --- a/astroid/tests/testdata/python2/data/SSL1/Connection1.py +++ b/astroid/tests/testdata/python2/data/SSL1/Connection1.py @@ -1,7 +1,7 @@ """M2Crypto.SSL.Connection Copyright (c) 1999-2004 Ng Pheng Siong. All rights reserved.""" - +from __future__ import print_statement RCS_id='$Id: Connection1.py,v 1.1 2005-06-13 20:55:22 syt Exp $' #Some code deleted here @@ -11,4 +11,4 @@ class Connection: """An SSL connection.""" def __init__(self, ctx, sock=None): - print 'init Connection' + print('init Connection') diff --git a/astroid/tests/testdata/python2/data/appl/myConnection.py b/astroid/tests/testdata/python2/data/appl/myConnection.py index 4afc9e4..35fc0ab 100644 --- a/astroid/tests/testdata/python2/data/appl/myConnection.py +++ b/astroid/tests/testdata/python2/data/appl/myConnection.py @@ -1,10 +1,11 @@ +from __future__ import print_statement from data import SSL1 class MyConnection(SSL1.Connection): """An SSL connection.""" def __init__(self, dummy): - print 'MyConnection init' + print('MyConnection init') if __name__ == '__main__': myConnection = MyConnection(' ') diff --git a/astroid/tests/testdata/python2/data/module.py b/astroid/tests/testdata/python2/data/module.py index fb48dc1..51e36bd 100644 --- a/astroid/tests/testdata/python2/data/module.py +++ b/astroid/tests/testdata/python2/data/module.py @@ -1,6 +1,6 @@ """test module for astroid """ - +from __future__ import print_function __revision__ = '$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $' from logilab.common.shellutils import ProgressBar as pb from astroid import modutils @@ -19,7 +19,7 @@ def global_access(key, val): else: break else: - print '!!!' + print('!!!') class YO: @@ -52,10 +52,10 @@ class YOUPI(YO): local = None autre = [a for (a, b) in MY_DICT if b] if b in autre: - print 'yo', + print('yo') else: if a in autre: - print 'hehe' + print('hehe') global_access(local, val=autre) finally: return local @@ -73,7 +73,7 @@ class YOUPI(YO): def four_args(a, b, c, d): """four arguments (was nested_args)""" - print a, b, c, d + print(a, b, c, d) while 1: if a: break diff --git a/astroid/tests/testdata/python2/data/module1abs/__init__.py b/astroid/tests/testdata/python2/data/module1abs/__init__.py index 9eb5902..173c2fd 100644 --- a/astroid/tests/testdata/python2/data/module1abs/__init__.py +++ b/astroid/tests/testdata/python2/data/module1abs/__init__.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import +from __future__ import absolute_import, print_statement from . import core from .core import * -print sys.version +print(sys.version) diff --git a/astroid/tests/testdata/python2/data/module2.py b/astroid/tests/testdata/python2/data/module2.py index d6bf49e..0a1bd1a 100644 --- a/astroid/tests/testdata/python2/data/module2.py +++ b/astroid/tests/testdata/python2/data/module2.py @@ -70,7 +70,7 @@ class Concrete23(Concrete1): del YO.member del YO [SYN1, SYN2] = (Concrete0, Concrete1) -assert `1` +assert '1' b = (1) | (((2) & (3)) ^ (8)) bb = ((1) | (two)) | (6) ccc = ((one) & (two)) & (three) diff --git a/astroid/tests/testdata/python2/data/nonregr.py b/astroid/tests/testdata/python2/data/nonregr.py index a670e39..813469f 100644 --- a/astroid/tests/testdata/python2/data/nonregr.py +++ b/astroid/tests/testdata/python2/data/nonregr.py @@ -1,4 +1,4 @@ -from __future__ import generators +from __future__ import generators, print_function try: enumerate = enumerate @@ -13,7 +13,7 @@ except NameError: def toto(value): for k, v in value: - print v.get('yo') + print(v.get('yo')) import imp diff --git a/astroid/tests/testdata/python2/data/notall.py b/astroid/tests/testdata/python2/data/notall.py index b998d88..df20cb2 100644 --- a/astroid/tests/testdata/python2/data/notall.py +++ b/astroid/tests/testdata/python2/data/notall.py @@ -1,8 +1,8 @@ - +from __future__ import print_statement name = 'a' _bla = 2 other = 'o' class Aaa: pass -def func(): print 'yo' +def func(): print('yo') |
