mirror of https://github.com/celery/kombu.git
PEP8ify
This commit is contained in:
parent
31a2ea90ca
commit
7b7d589923
|
@ -27,6 +27,7 @@ def no_enoent():
|
||||||
if exc.errno != errno.ENOENT:
|
if exc.errno != errno.ENOENT:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
class StringVersion(object):
|
class StringVersion(object):
|
||||||
|
|
||||||
def decode(self, s):
|
def decode(self, s):
|
||||||
|
@ -62,6 +63,7 @@ class TupleVersion(object):
|
||||||
v.pop()
|
v.pop()
|
||||||
return ", ".join(map(quote, v))
|
return ", ".join(map(quote, v))
|
||||||
|
|
||||||
|
|
||||||
class VersionFile(object):
|
class VersionFile(object):
|
||||||
|
|
||||||
def __init__(self, filename):
|
def __init__(self, filename):
|
||||||
|
@ -90,6 +92,7 @@ class VersionFile(object):
|
||||||
if m:
|
if m:
|
||||||
return self.type.decode(m.groups()[0])
|
return self.type.decode(m.groups()[0])
|
||||||
|
|
||||||
|
|
||||||
class PyVersion(VersionFile):
|
class PyVersion(VersionFile):
|
||||||
regex = re.compile(r'^VERSION\s*=\s*\((.+?)\)')
|
regex = re.compile(r'^VERSION\s*=\s*\((.+?)\)')
|
||||||
wb = "VERSION = (%s)\n"
|
wb = "VERSION = (%s)\n"
|
||||||
|
@ -149,9 +152,5 @@ def main(argv=sys.argv, docfile="README.rst", custom=None):
|
||||||
pass
|
pass
|
||||||
bump(dist, docfile, custom)
|
bump(dist, docfile, custom)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ for module, items in all_by_module.iteritems():
|
||||||
for item in items:
|
for item in items:
|
||||||
object_origins[item] = module
|
object_origins[item] = module
|
||||||
|
|
||||||
|
|
||||||
class module(ModuleType):
|
class module(ModuleType):
|
||||||
|
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
|
|
Loading…
Reference in New Issue