uselotus / lotus

File .deepsource.toml not found in the default branch of the repository root. Please refer to the docs.

Consider using f-strings PYL-C0209
Performance
Minor
a year agoa year old
Formatting a regular string which could be a f-string
1004        if len(customer_balances_adjustment) == 0:
1005            return Response(
1006                {
1007                    "error_detail": "CustomerBalanceAdjustmentView with customer_id {} does not exist".format(1008                        customer_id
1009                    )
1010                },
Formatting a regular string which could be a f-string
75    subject = f"Join {organization_name} in Lotus"
76    body = f"Use this link to join {organization_name} team: {reset_url}"
77    from_email = f"Lotus <{DEFAULT_FROM_EMAIL}>"
78    html = """79            <p>Register to <a href={url}>join {organization_name}</a> team</p>""".format(
80        url=reset_url, organization_name=organization_name
81    )
Formatting a regular string which could be a f-string
60            token_object.expire_at = now_plus_day()
61            token_object.save()
62        path = "register?token=%s" % (token_object.token)
63        password_reset_url = "%s/%s" % (settings.APP_URL, path)64
65        send_invite_email(
66            reset_url=password_reset_url,
Formatting a regular string which could be a f-string
59            token_object.user = user
60            token_object.expire_at = now_plus_day()
61            token_object.save()
62        path = "register?token=%s" % (token_object.token)63        password_reset_url = "%s/%s" % (settings.APP_URL, path)
64
65        send_invite_email(
Formatting a regular string which could be a f-string
140        try:
141            stripe_pi = stripe.Invoice.retrieve(invoice.external_payment_obj_id)
142        except Exception as e:
143            assert False, "Payment intent not found for reason: {}".format(e)144
145        # update the status of the invoice
146        new_status = stripe_connector.update_payment_object_status(