686 """
687 order = safe_query(Order, 'identifier', order_identifier, 'identifier')
688 paytm_mode = get_settings()['paytm_mode']
689 paytm_params = {}690 # body parameters
691 paytm_params["body"] = {
692 "requestType": "Payment",
381
382 @staticmethod
383 def hit_paytm_endpoint(url, head, body=None):
384 paytm_params = {}385 paytm_params["body"] = body
386 paytm_params["head"] = head
387 post_data = json.dumps(paytm_params)
Instead of adding items to a dictionary just after creation, it should be refactored to add those items into the dict definition itself.
env = {}
env['HOST'] = 'example.com'
env['PORT'] = 8080
env = {'HOST': 'example.com', 'PORT': 8080}