Skip to content

Commit 9271e29

Browse files
committed
Updated code comments
1 parent 743b14b commit 9271e29

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

amazon/paapi.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,13 @@ class instance: An instance of the class Product containing all the available
176176
return
177177

178178
try:
179-
"""Wait before doing the request"""
179+
# Wait before doing the request
180180
wait_time = 1 / self.throttling - (time.time() - self.last_query_time)
181181
if wait_time > 0:
182182
time.sleep(wait_time)
183183
self.last_query_time = time.time()
184184

185-
"""Request to the API"""
186185
response = api.get_items(request)
187-
188-
"""Parse the response and create a product"""
189186
if response.items_result is not None:
190187
if len(response.items_result.items) > 0:
191188
results = []
@@ -198,7 +195,7 @@ class instance: An instance of the class Product containing all the available
198195
except Exception:
199196
product.url = None
200197

201-
"""Parse ItemInfo data"""
198+
# Parse ItemInfo data
202199
try:
203200
item_info = item.item_info
204201
except Exception:
@@ -232,7 +229,7 @@ class instance: An instance of the class Product containing all the available
232229
except Exception:
233230
product.manufacturer = None
234231

235-
"""Parse Images data"""
232+
# Parse Images data
236233
try:
237234
images = item.images
238235
except Exception:
@@ -263,7 +260,7 @@ class instance: An instance of the class Product containing all the available
263260
except Exception:
264261
product.image_variants = None
265262

266-
"""Parse Offers Listings data"""
263+
# Parse Offers Listings data
267264
product.prices = Product()
268265
try:
269266
listings = item.offers.listings[0]
@@ -286,7 +283,7 @@ class instance: An instance of the class Product containing all the available
286283
except Exception:
287284
product.prices.currency = None
288285

289-
"""Parse Offers Summaries data"""
286+
# Parse Offers Summaries data
290287
product.offers = Product()
291288
try:
292289
product.offers = item.offers.summaries

0 commit comments

Comments
 (0)