File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 50
50
51
51
def record_to_text (record ):
52
52
"""Translate a json spool object to a readable string"""
53
- return f"#{ record ['id' ]} { record ['filament' ]['vendor' ]['name' ]} - { record ['filament' ]['material' ]} - { record ['filament' ]['name' ]} "
53
+ return (
54
+ f"#{ record ['id' ]} { record ['filament' ]['vendor' ]['name' ]} - "
55
+ f"{ record ['filament' ]['material' ]} - "
56
+ f"{ record ['filament' ]['name' ]} "
57
+ )
54
58
55
59
56
60
class PostList (npyscreen .MultiLineAction ):
@@ -76,7 +80,7 @@ def create(self):
76
80
url = args .url + "/api/v1/spool"
77
81
records = requests .get (url , timeout = 10 )
78
82
self .records = json .loads (records .text )
79
- self .records = sorted (self .records , key = lambda x : x ['id' ], reverse = True )
83
+ self .records = sorted (self .records , key = lambda x : x ["id" ], reverse = True )
80
84
81
85
self .posts = self .add (
82
86
PostList ,
You can’t perform that action at this time.
0 commit comments