autopep8 cleanup of Examples/test-suite/python

automated cleanup of python pep8 whitespace compliance
This commit is contained in:
Jon Schlueter 2015-05-06 08:27:35 -04:00 committed by Jon Schlueter
commit b77f3afafb
202 changed files with 3477 additions and 3382 deletions

View file

@ -1,16 +1,20 @@
from python_overload_simple_cast import *
class Ai:
def __init__(self,x):
def __init__(self, x):
self.x = x
def __int__(self):
return self.x
class Ad:
def __init__(self,x):
def __init__(self, x):
self.x = x
def __float__(self):
return self.x
@ -26,7 +30,7 @@ except:
good = 1
if not good:
raise RuntimeError, "fint(int)"
raise RuntimeError, "fint(int)"
if fint(ad) != "fint:int":
@ -40,7 +44,7 @@ if fint(ai) != "fint:int":
if fint(5.0) != "fint:int":
raise RuntimeError, "fint(int)"
if fint(3) != "fint:int":
raise RuntimeError, "fint(int)"
if fint(3.0) != "fint:int":
@ -53,20 +57,19 @@ if fdouble(3) != "fdouble:double":
if fdouble(3.0) != "fdouble:double":
raise RuntimeError, "fdouble(double)"
if fid(3,3.0) != "fid:intdouble":
if fid(3, 3.0) != "fid:intdouble":
raise RuntimeError, "fid:intdouble"
if fid(3.0,3) != "fid:doubleint":
if fid(3.0, 3) != "fid:doubleint":
raise RuntimeError, "fid:doubleint"
if fid(ad,ai) != "fid:doubleint":
if fid(ad, ai) != "fid:doubleint":
raise RuntimeError, "fid:doubleint"
if fid(ai,ad) != "fid:intdouble":
if fid(ai, ad) != "fid:intdouble":
raise RuntimeError, "fid:intdouble"
if foo(3) != "foo:int":
raise RuntimeError, "foo(int)"
@ -137,7 +140,7 @@ if s.type != "none":
s = Spam(3)
if s.type != "int":
raise RuntimeError, "Spam(int)"
s = Spam(3.4)
if s.type != "double":
raise RuntimeError, "Spam(double)"
@ -160,7 +163,7 @@ if s.type != "void *":
# unsigned long long
ullmax = 9223372036854775807 #0xffffffffffffffff
ullmax = 9223372036854775807 # 0xffffffffffffffff
ullmaxd = 9007199254740992.0
ullmin = 0
ullmind = 0.0
@ -174,7 +177,7 @@ if ull(ullmaxd) != ullmaxd:
raise RuntimeError, "ull(ullmaxd)"
# long long
llmax = 9223372036854775807 #0x7fffffffffffffff
llmax = 9223372036854775807 # 0x7fffffffffffffff
llmin = -9223372036854775808
# these are near the largest floats we can still convert into long long
llmaxd = 9007199254740992.0