Skip to content

Commit 1b6e9e9

Browse files
committed
Run black
1 parent d56706c commit 1b6e9e9

File tree

2 files changed

+34
-12
lines changed

2 files changed

+34
-12
lines changed

openandroidinstaller/installer_config.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44

55

66
class Step:
7-
def __init__(self, title: str, type: str, content: str, command: str = None, allow_skip: bool = False):
7+
def __init__(
8+
self,
9+
title: str,
10+
type: str,
11+
content: str,
12+
command: str = None,
13+
allow_skip: bool = False,
14+
):
815
self.title = title
916
self.type = type
1017
self.content = content

openandroidinstaller/openandroidinstaller.py

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ def main(page: Page):
4343
pb = ProgressBar(width=400, color="#00d886", bgcolor="#eeeeee", bar_height=16)
4444
pb.value = 0
4545
num_views = None # this is updated later
46-
inputtext = TextField(hint_text="your unlock code", expand=False) # textfield for the unlock code
46+
inputtext = TextField(
47+
hint_text="your unlock code", expand=False
48+
) # textfield for the unlock code
4749

4850
# Click-event handlers
4951

@@ -106,20 +108,25 @@ def views_from_config(config: InstallerConfig) -> List[View]:
106108
step_content = []
107109
# basic view depending on step.type
108110
if step.type == "confirm_button":
109-
step_content=[confirm_button(step.content)]
111+
step_content = [confirm_button(step.content)]
110112
elif step.type == "call_button":
111-
step_content=[call_button(step.content, command=step.command)]
113+
step_content = [call_button(step.content, command=step.command)]
112114
elif step.type == "call_button_with_input":
113-
step_content=[inputtext, call_button(step.content, command=step.command)]
115+
step_content = [
116+
inputtext,
117+
call_button(step.content, command=step.command),
118+
]
114119
elif step.type == "text":
115120
step_content = [Text(step.content)]
116121
else:
117122
raise Exception(f"Unknown step type: {step.type}")
118123

119124
# if skipping is allowed add a button to the view
120125
if step.allow_skip:
121-
step_content.append(confirm_button("Already done?", confirm_text="Skip"))
122-
126+
step_content.append(
127+
confirm_button("Already done?", confirm_text="Skip")
128+
)
129+
123130
# append the new view
124131
new_views.append(
125132
get_new_view(
@@ -257,14 +264,22 @@ def get_new_view(title: str, index: int, content: List = []) -> View:
257264
get_new_view(
258265
title="Welcome to OpenAndroidInstaller!",
259266
content=[
260-
Text("Before you continue, make sure your devices is on the latest system update."),
267+
Text(
268+
"Before you continue, make sure your devices is on the latest system update."
269+
),
261270
Divider(),
262-
Text("Enable USB debugging on your device by enabling developer options."),
263-
Text("To do this, tap seven times on the build number in the System-Menu in Settings."),
264-
Text("Then in developer options, toggle OEM unlocking and USB-Debugging."),
271+
Text(
272+
"Enable USB debugging on your device by enabling developer options."
273+
),
274+
Text(
275+
"To do this, tap seven times on the build number in the System-Menu in Settings."
276+
),
277+
Text(
278+
"Then in developer options, toggle OEM unlocking and USB-Debugging."
279+
),
265280
ElevatedButton(
266281
"Search device", on_click=search_devices, icon=icons.PHONE_ANDROID
267-
)
282+
),
268283
],
269284
index=0,
270285
),

0 commit comments

Comments
 (0)