X Tutup
Skip to content

Commit 4773da6

Browse files
fix get_encoding in inspection
1 parent 3217ac2 commit 4773da6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/inspection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def is_callable(obj):
273273

274274

275275
def get_encoding(obj):
276-
for line in inspect.getsourcelines(obj)[0][:2]:
276+
for line in inspect.findsource(obj)[0][:2]:
277277
m = re.search(r'coding[:=]\s*([-\w.]+)', line)
278278
if m:
279279
return m.group(1)

0 commit comments

Comments
 (0)
X Tutup