PEP8 reformat the code
@@ -7,8 +7,10 @@ from _pydevd_bundle.pydevd_constants import dict_iter_items, dict_keys, IS_PY3K,
MAXIMUM_VARIABLE_REPRESENTATION_SIZE, RETURN_VALUES_DICT
from _pydev_bundle.pydev_imports import quote
from _pydevd_bundle.pydevd_extension_api import TypeResolveProvider, StrPresentationProvider
+
try:
import types
+
frame_type = types.FrameType
except:
frame_type = None
@@ -16,6 +18,7 @@ except:
try:
from xml.sax.saxutils import escape
+
def make_valid_xml_value(s):
return escape(s, {'"': '&quot;'})
except:
@@ -23,12 +26,15 @@ except:
def make_valid_xml_value(s):
return s.replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;')
+
class ExceptionOnEvaluate:
def __init__(self, result):
self.result = result
+
_IS_JYTHON = sys.platform.startswith("java")
+
def _create_default_type_map():
if not _IS_JYTHON:
default_type_map = [
@@ -107,8 +113,8 @@ def _create_default_type_map():
return default_type_map
-class TypeResolveHandler(object):
+class TypeResolveHandler(object):
NO_PROVIDER = [] # Sentinel value (any mutable object to be used as a constant would be valid).
def __init__(self):
@@ -181,7 +187,6 @@ class TypeResolveHandler(object):
return self._base_get_type(o, type_name, type_name)
-
def str_from_providers(self, o, type_object, type_name):
provider = self._type_to_str_provider_cache.get(type_object)
@@ -304,7 +309,6 @@ def var_to_xml(val, name, doTrim=True, additional_in_xml=''):
except:
cName = str(v.__class__)
-
value = '%s: %s' % (cName, v)
else:
value = str(v)
@@ -356,4 +360,3 @@ def var_to_xml(val, name, doTrim=True, additional_in_xml=''):
xml_container = ''
return ''.join((xml, xml_qualifier, xml_value, xml_container, additional_in_xml, ' />\n'))
-
