Skip to content

Commit

Permalink
styles: fix flake8 styles
Browse files Browse the repository at this point in the history
  • Loading branch information
lihsai0 committed Dec 11, 2024
1 parent 6215617 commit 5c5d3ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qiniu/services/cdn/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import hashlib


class DataType(Enum):
BANDWIDTH = 'bandwidth'
X302BANDWIDTH = '302bandwidth'
Expand All @@ -17,6 +18,7 @@ class DataType(Enum):
X302FLOW = '302flow'
X302MFLOW = '302mflow'


def urlencode(str):
if is_py2:
import urllib2
Expand Down Expand Up @@ -118,7 +120,7 @@ def get_bandwidth_data(self, domains, start_date, end_date, granularity, data_ty
req.update({"endDate": end_date})
req.update({"granularity": granularity})
if data_type is not None:
req.update({'type': data_type.value}) # should be one of 'bandwidth', '302bandwidth', '302mbandwidth'
req.update({'type': data_type.value}) # should be one of 'bandwidth', '302bandwidth', '302mbandwidth'

body = json.dumps(req)
url = '{0}/v2/tune/bandwidth'.format(self.server)
Expand All @@ -145,7 +147,7 @@ def get_flux_data(self, domains, start_date, end_date, granularity, data_type=No
req.update({"endDate": end_date})
req.update({"granularity": granularity})
if data_type is not None:
req.update({'type': data_type.value}) # should be one of 'flow', '302flow', '302mflow'
req.update({'type': data_type.value}) # should be one of 'flow', '302flow', '302mflow'

body = json.dumps(req)
url = '{0}/v2/tune/flux'.format(self.server)
Expand Down

0 comments on commit 5c5d3ff

Please sign in to comment.