Commit b809cb8d authored by Vincent Pelletier's avatar Vincent Pelletier

Make update_docstrings use MRO instead of hardcoded lexer class.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38354 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9dbcd05d
......@@ -151,9 +151,10 @@ class lexer(object):
raise NotImplementedError
def update_docstrings(klass):
super_klass = super(klass, klass)
for property in dir(klass):
if property.startswith('t_'):
source = getattr(lexer, property, None)
source = getattr(super_klass, property, None)
if callable(source):
destination = getattr(klass, property)
assert callable(destination)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment