Added Flake8 lib and fixed PEP8 violations
This commit is contained in:
		
					parent
					
						
							
								0cbd3aa666
							
						
					
				
			
			
				commit
				
					
						edcfd3e9f4
					
				
			
		
					 65 changed files with 340 additions and 387 deletions
				
			
		|  | @ -7,7 +7,7 @@ stripe.api_key = settings.STRIPE_API_PRIVATE_KEY | |||
| 
 | ||||
| class StripePayment(object): | ||||
|     @classmethod | ||||
|     def make_payment(cls,user,amount,token,time): | ||||
|     def make_payment(cls, user, amount, token, time): | ||||
|         try: | ||||
|             print(amount) | ||||
|             print(amount) | ||||
|  | @ -19,7 +19,7 @@ class StripePayment(object): | |||
|                 source=token, | ||||
|                 description=settings.STRIPE_DESCRIPTION_ON_PAYMENT | ||||
|             ) | ||||
|             if charge['status'] =='succeeded': | ||||
|             if charge['status'] == 'succeeded': | ||||
|                 obj = CreditCards.objects.filter(user_id=user.id).first() | ||||
|                 obj.payment_type = time | ||||
|                 obj.save() | ||||
|  | @ -42,7 +42,7 @@ class StripePayment(object): | |||
|             return "Currently its not possible to make payments." | ||||
|         except stripe.error.StripeError as e: | ||||
|             return "Currently its not possible to make payments." | ||||
|             #maybe send email | ||||
|             # maybe send email | ||||
|         except Exception as e: | ||||
|             return "Currently its not possible to make payments." | ||||
|             #maybe send email | ||||
|             # maybe send email | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue