fixed linting
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Jens Timmerman 2021-08-06 23:39:05 +02:00
parent b9cd468827
commit 5607ec6012
6 changed files with 21 additions and 8 deletions

View File

@ -17,7 +17,7 @@ steps:
- coverage run --source='.' manage.py test --noinput --parallel
- name: run flake8
commands:
- flake8
- flake8 --max-line-length=120
- name: run pylint
commands:
- pylint --rcfile=.pylintrc -- **/*.py

15
.pylintrc Normal file
View File

@ -0,0 +1,15 @@
[MASTER]
load-plugins=pylint_django
django-settings-module=im.settings
[FORMAT]
max-line-length=120
[MESSAGES CONTROL]
disable=missing-docstring,unnecessary-pass
[DESIGN]
max-parents=13
[TYPECHECK]
generated-members=REQUEST,acl_users,aq_parent,"[a-zA-Z]+_set{1,2}",save,delete

View File

@ -4,10 +4,9 @@ from django.contrib.auth.models import User
class Events(models.Model):
id = models.AutoField(primary_key=True)
start = models.DateTimeField(null=True,blank=True)
end = models.DateTimeField(null=True,blank=True)
start = models.DateTimeField(null=True, blank=True)
end = models.DateTimeField(null=True, blank=True)
user = models.ForeignKey(User, on_delete=models.CASCADE)
def __str__(self):
return self.name

View File

@ -115,8 +115,8 @@ USE_I18N = True
USE_L10N = True
#USE_TZ = True
#TURNED off for simplicity
# USE_TZ = True
# TURNED off for simplicity
USE_TZ = False

View File

@ -1,5 +1,6 @@
from django.contrib.auth.forms import UserCreationForm
class CustomUserCreationForm(UserCreationForm):
class Meta(UserCreationForm.Meta):
fields = UserCreationForm.Meta.fields + ("email",)

View File

@ -1,5 +1,3 @@
from django.contrib.auth import login
from django.shortcuts import redirect, render
from django.urls import reverse