1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-26 18:37:12 +00:00

Flake8 complient

This commit is contained in:
Alexandre Iooss 2019-07-16 12:59:11 +02:00
parent fbe2e7f59a
commit 2313ebcdb4
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
6 changed files with 26 additions and 13 deletions

View File

@ -2,9 +2,9 @@
# Copyright (C) 2018-2019 by BDE ENS Paris-Saclay # Copyright (C) 2018-2019 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from django.conf import settings
from django.db import models from django.db import models
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django.conf import settings
class ActivityType(models.Model): class ActivityType(models.Model):

View File

@ -10,6 +10,7 @@ class CustomUserChangeForm(UserChangeForm):
Make first name, last name and email required Make first name, last name and email required
in the default Django Auth User model in the default Django Auth User model
""" """
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self.fields['first_name'].required = True self.fields['first_name'].required = True

View File

@ -72,18 +72,21 @@ class Club(models.Model):
membership_duration = models.DurationField( membership_duration = models.DurationField(
null=True, null=True,
verbose_name=_('membership duration'), verbose_name=_('membership duration'),
help_text=_('The longest time a membership can last (NULL = infinite).'), help_text=_('The longest time a membership can last '
'(NULL = infinite).'),
) )
membership_start = models.DurationField( membership_start = models.DurationField(
null=True, null=True,
verbose_name=_('membership start'), verbose_name=_('membership start'),
help_text=_('How long after January 1st the members can renew their membership.'), help_text=_('How long after January 1st the members can renew '
'their membership.'),
) )
membership_end = models.DurationField( membership_end = models.DurationField(
null=True, null=True,
verbose_name=_('membership end'), verbose_name=_('membership end'),
help_text=_('How long the membership can last after January 1st of the next year ' help_text=_('How long the membership can last after January 1st '
'after members can renew their membership.'), 'of the next year after members can renew their '
'membership.'),
) )

View File

@ -1,9 +1,9 @@
from django.contrib import admin from django.contrib import admin
from .models.notes import NoteClub, NoteUser, NoteSpecial, Alias from .models.notes import Alias, NoteClub, NoteSpecial, NoteUser
# Register your models here. # Register your models here.
admin.site.register(NoteClub)
admin.site.register(NoteUser)
admin.site.register(NoteSpecial)
admin.site.register(Alias) admin.site.register(Alias)
admin.site.register(NoteClub)
admin.site.register(NoteSpecial)
admin.site.register(NoteUser)

View File

@ -2,5 +2,13 @@
# Copyright (C) 2018-2019 by BDE ENS Paris-Saclay # Copyright (C) 2018-2019 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from .notes import * from .notes import Alias, Note, NoteClub, NoteSpecial, NoteUser
from .transactions import * from .transactions import MembershipTransaction, Transaction, \
TransactionTemplate
__all__ = [
# Notes
'Alias', 'Note', 'NoteClub', 'NoteSpecial', 'NoteUser',
# Transactions
'MembershipTransaction', 'Transaction', 'TransactionTemplate',
]

View File

@ -27,7 +27,7 @@ deps =
pyflakes pyflakes
pylint pylint
commands = commands =
flake8 note_* flake8 activity member note
pylint . pylint .
[flake8] [flake8]
@ -41,7 +41,8 @@ exclude =
*.pyc, *.pyc,
*.egg-info, *.egg-info,
.cache, .cache,
.eggs .eggs,
*migrations*
max-complexity = 10 max-complexity = 10
import-order-style = google import-order-style = google
application-import-names = flake8 application-import-names = flake8