From 775ab275319d618770fc181e2fd984df8c75b4e3 Mon Sep 17 00:00:00 2001 From: Nikos Epping Date: Sun, 21 Nov 2021 16:22:07 +0100 Subject: [PATCH] Fix formatting --- ihatemoney/forms.py | 10 ++++++++-- ihatemoney/web.py | 11 ++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ihatemoney/forms.py b/ihatemoney/forms.py index d2316fda..3ad7abea 100644 --- a/ihatemoney/forms.py +++ b/ihatemoney/forms.py @@ -11,7 +11,13 @@ from markupsafe import Markup from werkzeug.security import check_password_hash, generate_password_hash from wtforms.fields.core import Label, SelectField, SelectMultipleField from wtforms.fields.html5 import DateField, DecimalField, URLField -from wtforms.fields.simple import BooleanField, PasswordField, StringField, SubmitField, HiddenField +from wtforms.fields.simple import ( + BooleanField, + HiddenField, + PasswordField, + StringField, + SubmitField, +) from wtforms.validators import ( URL, DataRequired, @@ -326,7 +332,7 @@ class BillForm(FlaskForm): bill.payer_id = self.payer.data bill.amount = self.amount.data bill.what = self.what.data - tag = list(set(part[1:] for part in bill.what.split() if part.startswith('#'))) + tag = list(set(part[1:] for part in bill.what.split() if part.startswith("#"))) if tag: bill.tag = tag[0] bill.external_link = self.external_link.data diff --git a/ihatemoney/web.py b/ihatemoney/web.py index 3e265fdc..29c8e081 100644 --- a/ihatemoney/web.py +++ b/ihatemoney/web.py @@ -462,7 +462,16 @@ def import_project(file, project): json_file = json.load(file) # Check if JSON is correct - attr = ["what", "tag", "payer_name", "payer_weight", "amount", "currency", "date", "owers"] + attr = [ + "what", + "tag", + "payer_name", + "payer_weight", + "amount", + "currency", + "date", + "owers", + ] attr.sort() currencies = set() for e in json_file: