Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Conforming to lint
Marek Brzóskaeb2fd58e4a79
diff --git a/lint.py b/lint.pyindex 986e5746a7..a0568d05c4 100755--- a/lint.py+++ b/lint.py@@ -131,6 +131,7 @@ DISABLED_WARNINGS = [# 'W1111', # Assigning to function call which only returns None Used when an assignment is done on a function call but the inferred function returns nothing but None.# DjangoLint:'W6001', # Naive tree structure implementation using ForeignKey('self')+ 'I0011', # Locally disabling]diff --git a/order/models.py b/order/models.pyindex 71a8362390..e69de29bb2 100644--- a/order/models.py+++ b/order/models.py@@ -1,3 +0,0 @@-from django.db import models--# Create your models here.diff --git a/saleor/models.py b/saleor/models.pyindex 3b72772ae0..6f59a3b665 100644--- a/saleor/models.py+++ b/saleor/models.py@@ -12,23 +12,21 @@ from django.utils import timezoneclass UserManager(BaseUserManager):def create_user(self, email, password=None, is_staff=False,- is_superuser=False, is_active=True, **extra_fields):+ is_active=True, **extra_fields):"""Creates and saves a User with the given username, email and password."""now = timezone.now()email = UserManager.normalize_email(email)user = self.model(email=email, is_active=is_active, is_staff=is_staff,- is_superuser=is_superuser, last_login=now,- date_joined=now, **extra_fields)+ last_login=now, date_joined=now, **extra_fields)user.set_password(password)user.save()return userdef create_superuser(self, email, password=None, **extra_fields):- return self.create_user(email, password, is_staff=True,- is_superuser=True, **extra_fields)+ return self.create_user(email, password, is_staff=True, **extra_fields)class User(models.Model):@@ -48,31 +46,31 @@ class User(models.Model):objects = UserManager()+ def __unicode__(self):+ return self.get_username()++ def natural_key(self):+ return (self.get_username(),)+def get_full_name(self):return self.emaildef get_short_name(self):return self.email- def has_perm(self, perm, obj=None):+ def has_perm(self, *_args, **_kwargs):return True- def has_perms(self, perm_list, obj=None):+ def has_perms(self, *_args, **_kwargs):return True- def has_module_perms(self, app_label):+ def has_module_perms(self, _app_label):return Truedef get_username(self):"Return the identifying username for this User"return self.email- def __unicode__(self):- return self.get_username()-- def natural_key(self):- return (self.get_username(),)-def is_anonymous(self):return False