fossasia / open-event-server

Consider using f-strings PYL-C0209
Performance
Minor
5 months agoa year old
Formatting a regular string which could be a f-string
13        model = DiscountCode
14
15    marketer = factory.RelatedFactory(UserFactory)
16    code = factory.Sequence(lambda n: 'john%s' % n)17    discount_url = common.url_
18    value = common.float_
19    type = "amount"
Formatting a regular string which could be a f-string
52                    )
53                    time_diff = current_time - created_at_db
54                    allowed_time_lag = timedelta(milliseconds=400)
55                    message = "created_at not set" " to current time in {} \n".format(56                        model_factory
57                    )
58                    assert time_diff <= allowed_time_lag, message
Formatting a regular string which could be a f-string
33            )
34            connection_record.connection = connection_proxy.connection = None
35            raise exc.DisconnectionError(
36                "Connection record belongs to pid %s, "37                "attempting to check out in pid %s" % (connection_record.info['pid'], pid)
38            )
39
Formatting a regular string which could be a f-string
17    anonymous_user = db.Column(db.Boolean)
18
19    def __repr__(self):
20        return '<UserPerm %r>' % self.name
Formatting a regular string which could be a f-string
14    user = db.relationship("User", backref="alternate_emails", foreign_keys=[user_id])
15
16    def __repr__(self):
17        return '<Email %r>' % self.email_address