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
5454# path will be displayed.
5555
5656import ast
57- import token
5857import __future__
5958import builtins
6059import importlib ._bootstrap
@@ -77,6 +76,7 @@ class or function within a module or module in a package. If the
7776from collections import deque
7877from reprlib import Repr
7978from traceback import format_exception_only
79+ from token import tok_name
8080
8181from _pyrepl .pager import (get_pager , pipe_pager ,
8282 plain_pager , tempfile_pager , tty_pager )
@@ -400,7 +400,7 @@ def source_synopsis(file):
400400
401401 # tokenize always returns at least ENCODING and ENDMARKER
402402 for token in tokens :
403- token_name = token . tok_name [token .type ]
403+ token_name = tok_name [token .type ]
404404 if token .name not in {'COMMENT' , 'NL' , 'ENCODING' }:
405405 break
406406
You can’t perform that action at this time.
0 commit comments