forked from VimPlug/jedi
little changes to clean up the code (flake8)
This commit is contained in:
@@ -40,9 +40,7 @@ class Token(object):
|
||||
>>> unicode(Token(1, utf8("😷"), 1 ,1)) + "p" == utf8("😷p")
|
||||
True
|
||||
"""
|
||||
__slots__ = [
|
||||
"_token_type", "_token", "_start_pos_line", "_start_pos_col"
|
||||
]
|
||||
__slots__ = ("_token_type", "_token", "_start_pos_line", "_start_pos_col")
|
||||
|
||||
@classmethod
|
||||
def from_tuple(cls, tp):
|
||||
@@ -136,6 +134,8 @@ class Token(object):
|
||||
|
||||
|
||||
class TokenNoCompat(Token):
|
||||
__slots__ = ()
|
||||
|
||||
def __unicode__(self):
|
||||
raise NotImplementedError("Compatibility only for basic token.")
|
||||
|
||||
@@ -151,6 +151,8 @@ class TokenDocstring(TokenNoCompat):
|
||||
|
||||
as_string() will clean the token representing the docstring.
|
||||
"""
|
||||
__slots__ = ()
|
||||
|
||||
def __init__(self, token=None, state=None):
|
||||
if token:
|
||||
self.__setstate__(token.__getstate__())
|
||||
|
||||
@@ -14,7 +14,10 @@ http://svn.wxwidgets.org/viewvc/wx/wxPython/trunk/src/gtk/_core.py?view=markup
|
||||
import resource
|
||||
import time
|
||||
import sys
|
||||
import urllib2
|
||||
try:
|
||||
import urllib.request as urllib2
|
||||
except ImportError:
|
||||
import urllib2
|
||||
import gc
|
||||
from os.path import abspath, dirname
|
||||
|
||||
|
||||
Reference in New Issue
Block a user