##// END OF EJS Templates
classes: fix class style problems found by b071cd58af50...
Thomas Arendsen Hein -
r14764:a7d58160 stable
parent child Browse files
Show More
@@ -104,7 +104,7 b' class Writer(writers.Writer):'
104 self.output = visitor.astext()
104 self.output = visitor.astext()
105
105
106
106
107 class Table:
107 class Table(object):
108 def __init__(self):
108 def __init__(self):
109 self._rows = []
109 self._rows = []
110 self._options = ['center']
110 self._options = ['center']
@@ -300,7 +300,7 b' class Translator(nodes.NodeVisitor):'
300 pass
300 pass
301
301
302 def list_start(self, node):
302 def list_start(self, node):
303 class enum_char:
303 class enum_char(object):
304 enum_style = {
304 enum_style = {
305 'bullet' : '\\(bu',
305 'bullet' : '\\(bu',
306 'emdash' : '\\(em',
306 'emdash' : '\\(em',
@@ -64,7 +64,7 b' class HTTPRangeHandler(urllib2.BaseHandl'
64 # HTTP's Range Not Satisfiable error
64 # HTTP's Range Not Satisfiable error
65 raise RangeError('Requested Range Not Satisfiable')
65 raise RangeError('Requested Range Not Satisfiable')
66
66
67 class RangeableFileObject:
67 class RangeableFileObject(object):
68 """File object wrapper to enable raw range handling.
68 """File object wrapper to enable raw range handling.
69 This was implemented primarilary for handling range
69 This was implemented primarilary for handling range
70 specifications for file:// urls. This object effectively makes
70 specifications for file:// urls. This object effectively makes
@@ -251,7 +251,7 b' except ImportError:'
251 if hasattr(os, "fork"):
251 if hasattr(os, "fork"):
252 _mixin = SocketServer.ForkingMixIn
252 _mixin = SocketServer.ForkingMixIn
253 else:
253 else:
254 class _mixin:
254 class _mixin(object):
255 pass
255 pass
256
256
257 def openlog(opt, default):
257 def openlog(opt, default):
@@ -124,7 +124,7 b' if sys.version_info < (2, 4):'
124 HANDLE_ERRORS = 1
124 HANDLE_ERRORS = 1
125 else: HANDLE_ERRORS = 0
125 else: HANDLE_ERRORS = 0
126
126
127 class ConnectionManager:
127 class ConnectionManager(object):
128 """
128 """
129 The connection manager must be able to:
129 The connection manager must be able to:
130 * keep track of all existing
130 * keep track of all existing
@@ -187,7 +187,7 b' class ConnectionManager:'
187 else:
187 else:
188 return dict(self._hostmap)
188 return dict(self._hostmap)
189
189
190 class KeepAliveHandler:
190 class KeepAliveHandler(object):
191 def __init__(self):
191 def __init__(self):
192 self._cm = ConnectionManager()
192 self._cm = ConnectionManager()
193
193
@@ -705,7 +705,7 b' def fetch(N, url, delay=0):'
705 def test_timeout(url):
705 def test_timeout(url):
706 global DEBUG
706 global DEBUG
707 dbbackup = DEBUG
707 dbbackup = DEBUG
708 class FakeLogger:
708 class FakeLogger(object):
709 def debug(self, msg, *args):
709 def debug(self, msg, *args):
710 print msg % args
710 print msg % args
711 info = warning = error = debug
711 info = warning = error = debug
@@ -1009,7 +1009,7 b' class hunk(object):'
1009 def new(self, fuzz=0, toponly=False):
1009 def new(self, fuzz=0, toponly=False):
1010 return self.fuzzit(self.b, fuzz, toponly)
1010 return self.fuzzit(self.b, fuzz, toponly)
1011
1011
1012 class binhunk:
1012 class binhunk(object):
1013 'A binary patch file. Only understands literals so far.'
1013 'A binary patch file. Only understands literals so far.'
1014 def __init__(self, lr):
1014 def __init__(self, lr):
1015 self.text = None
1015 self.text = None
@@ -85,7 +85,7 b' def unescapearg(escaped):'
85 # server side
85 # server side
86
86
87 # equivalent of wireproto's global functions
87 # equivalent of wireproto's global functions
88 class server:
88 class server(object):
89 def __init__(self, local):
89 def __init__(self, local):
90 self.local = local
90 self.local = local
91 def _call(self, name, args):
91 def _call(self, name, args):
@@ -1,6 +1,6 b''
1 from mercurial import wireproto
1 from mercurial import wireproto
2
2
3 class proto():
3 class proto(object):
4 def __init__(self, args):
4 def __init__(self, args):
5 self.args = args
5 self.args = args
6 def getargs(self, spec):
6 def getargs(self, spec):
@@ -21,7 +21,7 b' class clientrepo(wireproto.wirerepositor'
21 yield wireproto.todict(name=mangle(name)), f
21 yield wireproto.todict(name=mangle(name)), f
22 yield unmangle(f.value)
22 yield unmangle(f.value)
23
23
24 class serverrepo():
24 class serverrepo(object):
25 def greet(self, name):
25 def greet(self, name):
26 return "Hello, " + name
26 return "Hello, " + name
27
27
General Comments 0
You need to be logged in to leave comments. Login now