From 02c01f60bfeddc6d93eb17979adfa1d303c23c5a Mon Sep 17 00:00:00 2001 From: pycook Date: Mon, 27 Jun 2016 10:50:32 +0800 Subject: [PATCH] pep8 --- core/__init__.py | 2 +- lib/const.py | 4 +++- lib/value.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/__init__.py b/core/__init__.py index 99d8104..218d127 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -8,4 +8,4 @@ from ci_relation import cirelation from ci import ci from history import history from account import account -from special import special \ No newline at end of file +from special import special diff --git a/lib/const.py b/lib/const.py index 51409a4..ee25660 100644 --- a/lib/const.py +++ b/lib/const.py @@ -3,6 +3,8 @@ import datetime +from markupsafe import escape + from models.attribute import TextChoice from models.attribute import FloatChoice from models.attribute import IntegerChoice @@ -39,7 +41,7 @@ type_map = { 'converter': { 'int': string2int, 'float': float, - 'text': unicode, + 'text': escape, 'datetime': str2datetime, }, 'choice': { diff --git a/lib/value.py b/lib/value.py index f9916f7..4c98469 100644 --- a/lib/value.py +++ b/lib/value.py @@ -167,4 +167,4 @@ class AttributeValueManager(object): return True, (attr.attr_id, "update", old_value, value) else: return True, None - return True, (attr.attr_id, "add", None, value) \ No newline at end of file + return True, (attr.attr_id, "add", None, value)