equal
deleted
inserted
replaced
120 |
120 |
121 src = inspect.getsource(func) |
121 src = inspect.getsource(func) |
122 name = "%s.%s" % (actualpath, func.__name__) |
122 name = "%s.%s" % (actualpath, func.__name__) |
123 lineno = inspect.getsourcelines(func)[1] |
123 lineno = inspect.getsourcelines(func)[1] |
124 doc = func.__doc__ |
124 doc = func.__doc__ |
|
125 origdoc = getattr(func, '_origdoc', '') |
125 if rstrip: |
126 if rstrip: |
126 doc = doc.rstrip() |
127 doc = doc.rstrip() |
127 lineno += offset(src, doc, name, 1) |
128 origdoc = origdoc.rstrip() |
|
129 if origdoc: |
|
130 lineno += offset(src, origdoc, name, 1) |
|
131 else: |
|
132 lineno += offset(src, doc, name, 1) |
128 print(poentry(actualpath, lineno, doc)) |
133 print(poentry(actualpath, lineno, doc)) |
129 |
134 |
130 |
135 |
131 def rawtext(path): |
136 def rawtext(path): |
132 src = open(path).read() |
137 src = open(path).read() |