Skip to content

Commit 2a41a62

Browse files
authored
Reformat with new black version (#776)
1 parent 9f64c8a commit 2a41a62

File tree

125 files changed

+130
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+130
-172
lines changed

collectives/api/admin.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" API for user list in administration page.
2-
3-
"""
1+
"""API for user list in administration page."""
42

53
import json
64

collectives/api/autocomplete_reservation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" API for autocomplete equipment type names and images.
1+
"""API for autocomplete equipment type names and images.
22
33
Especially used for reservations by leaders.
44

collectives/api/autocomplete_user.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" API for autocomplete users name.
1+
"""API for autocomplete users name.
22
33
Especially used for user registration by leader in events.
44

collectives/api/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" API submodule for the blueprint
1+
"""API submodule for the blueprint
22
33
Typical usage example:
44
::

collectives/api/equipment.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" API for equipment.
2-
3-
"""
1+
"""API for equipment."""
42

53
import json
64

collectives/api/event.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" API to get the event list in index page.
2-
3-
"""
1+
"""API to get the event list in index page."""
42

53
import json
64

collectives/api/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module to expose part of the model.
1+
"""Module to expose part of the model.
22
33
Usually export as js file to be directly used by js."""
44

collectives/api/payment.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" API endpoint for listing payments.
2-
3-
"""
1+
"""API endpoint for listing payments."""
42

53
import json
64

collectives/api/reservation.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" API for reservation.
2-
3-
"""
1+
"""API for reservation."""
42

53
from datetime import datetime, timedelta
64
import json

collectives/api/upload.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" API endpoint for managing uploaded files.
2-
3-
"""
1+
"""API endpoint for managing uploaded files."""
42

53
import json
64

collectives/api/userevent.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" API used to get events linked to a user for profiles.
1+
"""API used to get events linked to a user for profiles.
22
33
Event schema is the one from :py:class:`collectives.api.event.EventSchema`
44
"""

collectives/email_templates.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Templates for mails
2-
"""
1+
"""Templates for mails"""
32

43
from functools import wraps
54
from typing import List

collectives/forms/activity_type.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for activity type related forms"""
1+
"""Module for activity type related forms"""
22

33
from typing import List
44

collectives/forms/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" List of Form used to modify configuration """
1+
"""List of Form used to modify configuration"""
22

33
from flask_wtf import FlaskForm
44

collectives/forms/csv.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module containing forms related to CSV import
2-
"""
1+
"""Module containing forms related to CSV import"""
32

43
from flask_wtf import FlaskForm
54
from flask_wtf.file import FileField

collectives/forms/equipment.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module containing forms related to equipment management
2-
"""
1+
"""Module containing forms related to equipment management"""
32

43
from datetime import datetime
54
from decimal import Decimal

collectives/forms/event.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module containing forms related to event management
2-
"""
1+
"""Module containing forms related to event management"""
32

43
from operator import attrgetter
54
from uuid import uuid4

collectives/forms/order.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Helper module for explicitly ordering fields in WTForms
2-
"""
1+
"""Helper module for explicitly ordering fields in WTForms"""
32

43
from collections import OrderedDict
54
from flask_wtf import FlaskForm

collectives/forms/payment.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for payment forms"""
1+
"""Module for payment forms"""
22

33
from decimal import Decimal
44

collectives/forms/reservation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for equipment reservation forms"""
1+
"""Module for equipment reservation forms"""
22

33
from datetime import datetime
44
from wtforms import SubmitField, HiddenField

collectives/forms/stats.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Form for statistics display and parameters """
1+
"""Form for statistics display and parameters"""
22

33
from datetime import date
44

collectives/forms/upload.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module containing forms for uploading documents
2-
"""
1+
"""Module containing forms for uploading documents"""
32

43
from flask_wtf.file import FileField, FileAllowed
54
from wtforms.validators import DataRequired

collectives/forms/user.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module containing forms for updating user information
2-
"""
1+
"""Module containing forms for updating user information"""
32

43
from datetime import date
54
from flask import request

collectives/models/activity_type.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module to describe the type of activity.
2-
"""
1+
"""Module to describe the type of activity."""
32

43
import json
54
from sqlalchemy.orm import validates

collectives/models/badge.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module for user badges related classes
2-
"""
1+
"""Module for user badges related classes"""
32

43
from datetime import date
54
from sqlalchemy.sql import func

collectives/models/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Model to store flask config into sql. """
1+
"""Model to store flask config into sql."""
22

33
import enum
44
import json

collectives/models/equipment.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module for equipment related classes
2-
"""
1+
"""Module for equipment related classes"""
32

43
import os
54
from genericpath import isfile

collectives/models/event/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module for event related classes
2-
"""
1+
"""Module for event related classes"""
32

43
from collectives.models.globals import db
54
from collectives.models.event.model import EventModelMixin

collectives/models/event/date.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for all Event methods related to date manipulation and check."""
1+
"""Module for all Event methods related to date manipulation and check."""
22

33
from datetime import timedelta
44
from math import ceil

collectives/models/event/enum.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for enum related to events"""
1+
"""Module for enum related to events"""
22

33
from typing import Dict
44

collectives/models/event/event_type.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module to describe the type of event.
2-
"""
1+
"""Module to describe the type of event."""
32

43
import json
54

collectives/models/event/misc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for misc Event methods which does not fit in another submodule"""
1+
"""Module for misc Event methods which does not fit in another submodule"""
22

33
from typing import List
44
from flask_uploads import UploadSet, IMAGES

collectives/models/event/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for all Event attributes. """
1+
"""Module for all Event attributes."""
22

33
from sqlalchemy.ext.declarative import declared_attr
44
from sqlalchemy.orm import validates

collectives/models/event/payment.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for all Event methods related to payments."""
1+
"""Module for all Event methods related to payments."""
22

33
from datetime import timedelta
44

collectives/models/event/registration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for all Event methods related to registration manipulation and check."""
1+
"""Module for all Event methods related to registration manipulation and check."""
22

33
from typing import List
44
from datetime import datetime

collectives/models/event/role.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for all Event methods related to role manipulation and check."""
1+
"""Module for all Event methods related to role manipulation and check."""
22

33
from typing import List
44

collectives/models/event_tag.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module for event tag classes.
2-
"""
1+
"""Module for event tag classes."""
32

43
from typing import Dict, Any
54
from flask import current_app

collectives/models/globals.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" System wide model tools """
1+
"""System wide model tools"""
22

33
from flask_sqlalchemy import SQLAlchemy
44
from sqlalchemy_utils import force_auto_coercion

collectives/models/payment.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module defining payment-related models
2-
"""
1+
"""Module defining payment-related models"""
32

43
from decimal import Decimal
54
from datetime import timedelta

collectives/models/question.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module defining question-related models
2-
"""
1+
"""Module defining question-related models"""
32

43
from typing import List
54

collectives/models/registration.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module for registration related classes
2-
"""
1+
"""Module for registration related classes"""
32

43
from typing import List, Optional
54
from datetime import timedelta, datetime

collectives/models/reservation.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module for registration related classes
2-
"""
1+
"""Module for registration related classes"""
32

43
from datetime import datetime
54
from sqlalchemy import CheckConstraint

collectives/models/role.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module for user roles related classes
2-
"""
1+
"""Module for user roles related classes"""
32

43
from typing import List, Dict
54

collectives/models/upload.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module for file upload related classes
2-
"""
1+
"""Module for file upload related classes"""
32

43
import os
54
from datetime import timedelta

collectives/models/user/__init__.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""Module for user related classes
2-
3-
"""
1+
"""Module for user related classes"""
42

53
import os
64

collectives/models/user/badge.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for all User methods related to badge manipulation and check."""
1+
"""Module for all User methods related to badge manipulation and check."""
22

33
from typing import List, Optional, Set
44

collectives/models/user/enum.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for enum related to users"""
1+
"""Module for enum related to users"""
22

33
from collectives.models.utils import ChoiceEnum
44

collectives/models/user/misc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for misc User methods which does not fit in another submodule"""
1+
"""Module for misc User methods which does not fit in another submodule"""
22

33
import os
44
import datetime

collectives/models/user/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for all User attributes. """
1+
"""Module for all User attributes."""
22

33
from datetime import date, datetime
44

collectives/models/user/role.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Module for all User methods related to role manipulation and check."""
1+
"""Module for all User methods related to role manipulation and check."""
22

33
from typing import List, Set
44
import datetime

collectives/models/user_group.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Handle dynamic user groups, for restricting or payment options """
1+
"""Handle dynamic user groups, for restricting or payment options"""
22

33
from typing import List
44

collectives/models/utils.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Set utils classes for models
2-
"""
1+
"""Set utils classes for models"""
32

43
import enum
54
import json

collectives/routes/activity_supervison.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
""" Module for activity supervision routes.
1+
"""Module for activity supervision routes.
22

33
Restricted to activity supervisor, adminstrators, and President.
4-
"""
4+
"""
55

66
from flask import flash, render_template, redirect, url_for
77
from flask import Blueprint, send_file, abort, request

collectives/routes/administration.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
""" Module for all administration routes.
1+
"""Module for all administration routes.
22

33
All routes are protected by :py:fun:`before_request` which protect acces to admin only.
4-
"""
4+
5+
"""
56

67
from datetime import date
78

collectives/routes/auth/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" This module concerns every routes regarding
1+
"""This module concerns every routes regarding
22
authentification (login, signup, etc...)"""
33

44
from collectives.routes.auth.globals import login_manager, blueprint

collectives/routes/auth/globals.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Auth module that contains all global values."""
1+
"""Auth module that contains all global values."""
22

33
from flask_login import LoginManager
44
from flask import Blueprint

collectives/routes/auth/login.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Auth modules to log in an user. """
1+
"""Auth modules to log in an user."""
22

33
import datetime
44
from urllib.parse import urlparse

collectives/routes/auth/signup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Auth login to perform account creation and recover. """
1+
"""Auth login to perform account creation and recover."""
22

33
import datetime
44

collectives/routes/auth/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Auth module for miscaleneous functions and classes."""
1+
"""Auth module for miscaleneous functions and classes."""
22

33
from flask import url_for, current_app
44
from flask_login import AnonymousUserMixin

0 commit comments

Comments
 (0)