From 938cf4c33a0695ef1011b07e455a7ec2f87b5ad3 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Thu, 10 Jan 2019 03:00:41 +0800 Subject: BaseTools: fix imports 1 - Some of these imports are cascaded from another file. Import them locally. 2 - Some of these imports are not used. Remove them. 3 - Some of these were missing the namespace used to import them. These changes facilitate optimization of BaseTools: https://bugzilla.tianocore.org/show_bug.cgi?id=42 Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Bob Feng --- BaseTools/Source/Python/Common/RangeExpression.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/Common/RangeExpression.py') diff --git a/BaseTools/Source/Python/Common/RangeExpression.py b/BaseTools/Source/Python/Common/RangeExpression.py index 407dc06ccf..40958451d2 100644 --- a/BaseTools/Source/Python/Common/RangeExpression.py +++ b/BaseTools/Source/Python/Common/RangeExpression.py @@ -19,6 +19,7 @@ from CommonDataClass.Exceptions import WrnExpression import uuid from Common.Expression import PcdPattern, BaseExpression from Common.DataType import * +from re import compile ERR_STRING_EXPR = 'This operator cannot be used in string expression: [%s].' ERR_SNYTAX = 'Syntax error, the rest of expression cannot be evaluated: [%s].' @@ -202,7 +203,7 @@ class RangeExpression(BaseExpression): NonLetterOpLst = ['+', '-', '&', '|', '^', '!', '=', '>', '<'] - RangePattern = re.compile(r'[0-9]+ - [0-9]+') + RangePattern = compile(r'[0-9]+ - [0-9]+') def preProcessRangeExpr(self, expr): # convert hex to int -- cgit v1.2.3