File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ class or function within a module or module in a package. If the
54
54
# path will be displayed.
55
55
56
56
import ast
57
- import token
58
57
import __future__
59
58
import builtins
60
59
import importlib ._bootstrap
@@ -77,6 +76,7 @@ class or function within a module or module in a package. If the
77
76
from collections import deque
78
77
from reprlib import Repr
79
78
from traceback import format_exception_only
79
+ from token import tok_name
80
80
81
81
from _pyrepl .pager import (get_pager , pipe_pager ,
82
82
plain_pager , tempfile_pager , tty_pager )
@@ -400,7 +400,7 @@ def source_synopsis(file):
400
400
401
401
# tokenize always returns at least ENCODING and ENDMARKER
402
402
for token in tokens :
403
- token_name = token . tok_name [token .type ]
403
+ token_name = tok_name [token .type ]
404
404
if token .name not in {'COMMENT' , 'NL' , 'ENCODING' }:
405
405
break
406
406
You can’t perform that action at this time.
0 commit comments