summaryrefslogtreecommitdiff
path: root/sphinx/pycode/__init__.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-03-21 20:55:30 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-03-21 20:55:30 +0900
commitf9753e30deaa2ba6824e624aaf7ec464279123e4 (patch)
treecf2eaf418c78f8bec1e4626c137423ccdd758f4c /sphinx/pycode/__init__.py
parentd7a9c8638bf3fd54f3d0f3fe6f21118620bec238 (diff)
parentce3019821b1f805bc72dfe5ecef727419701c410 (diff)
downloadsphinx-git-f9753e30deaa2ba6824e624aaf7ec464279123e4.tar.gz
Merge branch '1.7'
Diffstat (limited to 'sphinx/pycode/__init__.py')
-rw-r--r--sphinx/pycode/__init__.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py
index 04353e805..c4c055bf5 100644
--- a/sphinx/pycode/__init__.py
+++ b/sphinx/pycode/__init__.py
@@ -120,23 +120,3 @@ class ModuleAnalyzer(object):
self.parse()
return self.tags
-
-
-if __name__ == '__main__':
- import time
- import pprint
- x0 = time.time()
- # ma = ModuleAnalyzer.for_file(__file__.rstrip('c'), 'sphinx.builders.html')
- ma = ModuleAnalyzer.for_file('sphinx/environment.py',
- 'sphinx.environment')
- ma.tokenize() # type: ignore
- x1 = time.time()
- ma.parse()
- x2 = time.time()
- # for (ns, name), doc in iteritems(ma.find_attr_docs()):
- # print '>>', ns, name
- # print '\n'.join(doc)
- pprint.pprint(ma.find_tags())
- x3 = time.time()
- # print nodes.nice_repr(ma.parsetree, number2name)
- print("tokenizing %.4f, parsing %.4f, finding %.4f" % (x1 - x0, x2 - x1, x3 - x2))