diff --git a/.isort.cfg b/.isort.cfg index ba73fb7a..b24029fa 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -5,6 +5,7 @@ include_trailing_comma=True force_grid_wrap=0 line_length=88 combine_as_imports=True +profile = "black" # If set, imports will be sorted within their section independent to the import_type. force_sort_within_sections=True diff --git a/ihatemoney/tests/budget_test.py b/ihatemoney/tests/budget_test.py index e3292053..43b75bda 100644 --- a/ihatemoney/tests/budget_test.py +++ b/ihatemoney/tests/budget_test.py @@ -964,9 +964,7 @@ class TestBudget(IhatemoneyTestCase): assert """ Project - Number of participants""" in resp.data.decode( - "utf-8" - ) + Number of participants""" in resp.data.decode("utf-8") def test_dashboard_project_deletion(self): self.post_project("raclette") diff --git a/ihatemoney/web.py b/ihatemoney/web.py index 54f3b9fd..1164a1e9 100644 --- a/ihatemoney/web.py +++ b/ihatemoney/web.py @@ -8,14 +8,12 @@ Basically, this blueprint takes care of the authentication and provides some shortcuts to make your life better when coding (see `pull_project` and `add_project_id` for a quick overview) """ +from functools import wraps import hashlib import json import os -from functools import wraps from urllib.parse import urlparse, urlunparse -import qrcode -import qrcode.image.svg from flask import ( Blueprint, Response, @@ -34,6 +32,8 @@ from flask import ( ) from flask_babel import gettext as _ from flask_mail import Message +import qrcode +import qrcode.image.svg from sqlalchemy_continuum import Operation from werkzeug.exceptions import NotFound from werkzeug.security import check_password_hash