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")
|
>>> unicode(Token(1, utf8("😷"), 1 ,1)) + "p" == utf8("😷p")
|
||||||
True
|
True
|
||||||
"""
|
"""
|
||||||
__slots__ = [
|
__slots__ = ("_token_type", "_token", "_start_pos_line", "_start_pos_col")
|
||||||
"_token_type", "_token", "_start_pos_line", "_start_pos_col"
|
|
||||||
]
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_tuple(cls, tp):
|
def from_tuple(cls, tp):
|
||||||
@@ -136,6 +134,8 @@ class Token(object):
|
|||||||
|
|
||||||
|
|
||||||
class TokenNoCompat(Token):
|
class TokenNoCompat(Token):
|
||||||
|
__slots__ = ()
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
raise NotImplementedError("Compatibility only for basic token.")
|
raise NotImplementedError("Compatibility only for basic token.")
|
||||||
|
|
||||||
@@ -151,6 +151,8 @@ class TokenDocstring(TokenNoCompat):
|
|||||||
|
|
||||||
as_string() will clean the token representing the docstring.
|
as_string() will clean the token representing the docstring.
|
||||||
"""
|
"""
|
||||||
|
__slots__ = ()
|
||||||
|
|
||||||
def __init__(self, token=None, state=None):
|
def __init__(self, token=None, state=None):
|
||||||
if token:
|
if token:
|
||||||
self.__setstate__(token.__getstate__())
|
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 resource
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
import urllib2
|
try:
|
||||||
|
import urllib.request as urllib2
|
||||||
|
except ImportError:
|
||||||
|
import urllib2
|
||||||
import gc
|
import gc
|
||||||
from os.path import abspath, dirname
|
from os.path import abspath, dirname
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user