fix if-chain in _code.source
This commit is contained in:
parent
2fe56b97c9
commit
543bac925a
|
@ -26,7 +26,7 @@ class Source(object):
|
|||
for part in parts:
|
||||
if not part:
|
||||
partlines = []
|
||||
if isinstance(part, Source):
|
||||
elif isinstance(part, Source):
|
||||
partlines = part.lines
|
||||
elif isinstance(part, (tuple, list)):
|
||||
partlines = [x.rstrip("\n") for x in part]
|
||||
|
@ -239,7 +239,6 @@ def getfslineno(obj):
|
|||
# helper functions
|
||||
#
|
||||
|
||||
|
||||
def findsource(obj):
|
||||
try:
|
||||
sourcelines, lineno = inspect.findsource(obj)
|
||||
|
|
Loading…
Reference in New Issue