mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-18 06:19:39 +08:00
remove __getitem__ from Token
This commit is contained in:
@@ -12,14 +12,7 @@ from jedi._compatibility import unicode
|
||||
from jedi.parser.tokenize import Token
|
||||
|
||||
|
||||
class TokenNoCompat(Token):
|
||||
__slots__ = ()
|
||||
|
||||
def __getitem__(self, key):
|
||||
raise NotImplementedError("Compatibility only for basic token.")
|
||||
|
||||
|
||||
class TokenDocstring(TokenNoCompat):
|
||||
class TokenDocstring(Token):
|
||||
"""A string token that is a docstring.
|
||||
|
||||
as_string() will clean the token representing the docstring.
|
||||
|
||||
Reference in New Issue
Block a user