summaryrefslogtreecommitdiff
path: root/cherrypy/lib/gctools.py
diff options
context:
space:
mode:
authorGustavo Picon <tabo@tabo.pe>2014-01-12 13:57:44 -0500
committerGustavo Picon <tabo@tabo.pe>2014-01-12 13:57:44 -0500
commitc26eb490862e664dc4ef4ea6e55c1dbd106146c4 (patch)
treef997c23aa6d04fc7db78e66ad5f58429b3be824e /cherrypy/lib/gctools.py
parentfb84f7713d6ced0031dacb0e7e59d516cc681a4d (diff)
downloadcherrypy-git-c26eb490862e664dc4ef4ea6e55c1dbd106146c4.tar.gz
Running: autopep8 -vvvvv -i `find . -name '*.py'`
--HG-- branch : autopep8
Diffstat (limited to 'cherrypy/lib/gctools.py')
-rw-r--r--cherrypy/lib/gctools.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cherrypy/lib/gctools.py b/cherrypy/lib/gctools.py
index e6af40b5..46365576 100644
--- a/cherrypy/lib/gctools.py
+++ b/cherrypy/lib/gctools.py
@@ -15,6 +15,7 @@ from cherrypy.process.plugins import SimplePlugin
class ReferrerTree(object):
+
"""An object which gathers all referrers of an object to a given depth."""
peek_length = 40
@@ -89,6 +90,7 @@ class ReferrerTree(object):
def format(self, tree):
"""Return a list of string reprs from a nested list of referrers."""
output = []
+
def ascend(branch, depth=1):
for parent, grandparents in branch:
output.append((" " * depth) + self._format(parent))
@@ -111,7 +113,7 @@ class RequestCounter(SimplePlugin):
self.count += 1
def after_request(self):
- self.count -=1
+ self.count -= 1
request_counter = RequestCounter(cherrypy.engine)
request_counter.subscribe()
@@ -129,6 +131,7 @@ def get_context(obj):
class GCRoot(object):
+
"""A CherryPy page handler for testing reference leaks."""
classes = [(_cprequest.Request, 2, 2,
@@ -211,4 +214,3 @@ class GCRoot(object):
return "\n".join(output)
stats.exposed = True
-