Skip to content
This repository was archived by the owner on Jun 7, 2021. It is now read-only.

Commit ad1f757

Browse files
committed
Code formatting
1 parent f959694 commit ad1f757

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

example/mjpeg-stream.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ def generate_new_dummy_image(self):
5050
draw = ImageDraw.Draw(image)
5151
draw.text(
5252
(20, 70),
53-
"Current time: {}".format(
54-
datetime.now().strftime("%d/%m/%Y, %H:%M:%S")
55-
),
53+
"Current time: {}".format(datetime.now().strftime("%d/%m/%Y, %H:%M:%S")),
5654
)
5755

5856
image.save(self.stream, format="JPEG")
@@ -100,6 +98,7 @@ async def snapshot(self):
10098
await self.event.wait()
10199
return self.stream.getvalue()
102100

101+
103102
def make_thing():
104103
stream_generator = StreamGenerator()
105104

@@ -115,10 +114,7 @@ def make_thing():
115114
thing,
116115
"snapshot",
117116
Value(None, stream_generator.snapshot, None),
118-
metadata={
119-
"title": "Snapshot",
120-
"readOnly": True
121-
},
117+
metadata={"title": "Snapshot", "readOnly": True},
122118
content_type="image/jpeg",
123119
)
124120
)
@@ -128,10 +124,7 @@ def make_thing():
128124
thing,
129125
"stream",
130126
Value(None, stream_generator.stream_generator, None),
131-
metadata={
132-
"title": "Stream",
133-
"readOnly": True
134-
},
127+
metadata={"title": "Stream", "readOnly": True},
135128
content_type="multipart/x-mixed-replace;boundary=--boundarydonotcross",
136129
)
137130
)

0 commit comments

Comments
 (0)