Add McCabe complexity checker

This commit is contained in:
Ryan P Kilby 2019-04-17 20:46:45 -07:00
parent 43d3fd6fbc
commit ca222d7f92
3 changed files with 3 additions and 2 deletions

View File

@ -58,7 +58,7 @@ class SocialLoginSerializer(serializers.Serializer):
social_login.token = token
return social_login
def validate(self, attrs):
def validate(self, attrs): # noqa: C901
view = self.context.get('view')
request = self._get_request()

View File

@ -59,7 +59,7 @@ class LoginSerializer(serializers.Serializer):
return user
def validate(self, attrs):
def validate(self, attrs): # noqa: C901
username = attrs.get('username')
email = attrs.get('email')
password = attrs.get('password')

View File

@ -8,6 +8,7 @@ license_file = LICENSE
[flake8]
max_line_length = 120
max_complexity = 10
exclude = migrations