4 files changed +6
-20
lines changed Original file line number Diff line number Diff line change 18
18
19
19
db = SQLAlchemy (engine_options = {"echo" : True })
20
20
app = Flask (__name__ )
21
- app .config [
22
- "SQLALCHEMY_DATABASE_URI "
23
- ] = "sqlite:////tmp/example.db?check_same_thread=False"
21
+ app .config ["SQLALCHEMY_DATABASE_URI" ] = (
22
+ "sqlite:////tmp/example.db?check_same_thread=False "
23
+ )
24
24
db .init_app (app )
25
25
26
26
Original file line number Diff line number Diff line change @@ -34,11 +34,7 @@ class Attachment(Base):
34
34
multiple_content = Column (FileField (multiple = True ))
35
35
36
36
def __repr__ (self ):
37
- return "<Attachment: id {} ; name: {}; multiple_content {}>" .format (
38
- self .id ,
39
- self .name ,
40
- self .multiple_content ,
41
- ) # pragma: no cover
37
+ return f"<Attachment: id { self .id } ; name: { self .name } ; multiple_content { self .multiple_content } >" # pragma: no cover
42
38
43
39
44
40
class TestMultipleField :
Original file line number Diff line number Diff line change @@ -33,12 +33,7 @@ class Attachment(Base):
33
33
)
34
34
35
35
def __repr__ (self ):
36
- return "<Attachment: id {} ; name: {}; content {}; multiple_content {}>" .format (
37
- self .id ,
38
- self .name ,
39
- self .content ,
40
- self .multiple_content ,
41
- ) # pragma: no cover
36
+ return f"<Attachment: id { self .id } ; name: { self .name } ; content { self .content } ; multiple_content { self .multiple_content } >" # pragma: no cover
42
37
43
38
44
39
class TestResultValue :
Original file line number Diff line number Diff line change @@ -37,12 +37,7 @@ class Attachment(Base):
37
37
article_id = Column (Integer , ForeignKey ("article.id" ))
38
38
39
39
def __repr__ (self ):
40
- return "<Attachment: id {} ; name: {}; content {}; article_id {}>" .format (
41
- self .id ,
42
- self .name ,
43
- self .content ,
44
- self .article_id ,
45
- ) # pragma: no cover
40
+ return f"<Attachment: id { self .id } ; name: { self .name } ; content { self .content } ; article_id { self .article_id } >" # pragma: no cover
46
41
47
42
48
43
class Article (Base ):
0 commit comments