mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #4756 from tk0miya/4754_remove_unused_code
Fix #4754: sphinx/pycode/__init__.py raises AttributeError
This commit is contained in:
commit
58d118c8a7
1
CHANGES
1
CHANGES
@ -31,6 +31,7 @@ Bugs fixed
|
||||
* #4655, #4684: Incomplete localization strings in Polish and Chinese
|
||||
* #2286: Sphinx crashes when error is happens in rendering HTML pages
|
||||
* #4688: Error to download remote images having long URL
|
||||
* #4754: sphinx/pycode/__init__.py raises AttributeError
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -117,23 +117,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()
|
||||
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))
|
||||
|
Loading…
Reference in New Issue
Block a user