File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ install:
99- pip install requests
1010- pip install six
1111- pip install nose
12- - pip install pep8
12+ - pip install pycodestyle
1313- pip install dicttoxml
1414script :
15- - pep8 --max-line-length=180 qcloud_cos/.
15+ - pycodestyle --max-line-length=180 qcloud_cos/.
1616- nosetests -s -v ut/
1717deploy :
1818 provider : pypi
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ def format_region(region):
225225 if not region :
226226 raise CosClientError ("region is required not empty!" )
227227 region = to_unicode (region )
228- if not re .match ('^[A-Za-z0-9][A-Za-z0-9.\-]*[A-Za-z0-9]$' , region ):
228+ if not re .match (r '^[A-Za-z0-9][A-Za-z0-9.\-]*[A-Za-z0-9]$' , region ):
229229 raise CosClientError ("region format is illegal, only digit, letter and - is allowed!" )
230230 if region .find (u'cos.' ) != - 1 :
231231 return region # 传入cos.ap-beijing-1这样显示加上cos.的region
@@ -260,7 +260,7 @@ def format_bucket(bucket, appid):
260260 raise CosClientError ("bucket is not string" )
261261 if not bucket :
262262 raise CosClientError ("bucket is required not empty" )
263- if not (re .match ('^[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]$' , bucket ) or re .match ('^[A-Za-z0-9]$' , bucket )):
263+ if not (re .match (r '^[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]$' , bucket ) or re .match ('^[A-Za-z0-9]$' , bucket )):
264264 raise CosClientError ("bucket format is illegal, only digit, letter and - is allowed!" )
265265 # appid为空直接返回bucket
266266 if not appid :
You can’t perform that action at this time.
0 commit comments