Skip to content
This repository was archived by the owner on Jul 8, 2022. It is now read-only.

Commit 356bf8f

Browse files
committed
trim example
1 parent e81bd7b commit 356bf8f

File tree

1 file changed

+7
-25
lines changed

1 file changed

+7
-25
lines changed

main.py

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,6 @@
1313

1414
from arg_types import network_port, positive_int, non_empty_string
1515

16-
EMOJIS = [
17-
':baby_chick:',
18-
':blowfish:',
19-
':cow:',
20-
':dog:',
21-
':elephant:',
22-
':gorilla:',
23-
':monkey:',
24-
':see_no_evil:',
25-
':hear_no_evil:',
26-
':speak_no_evil:',
27-
':ox:',
28-
':pig:',
29-
':ram:',
30-
':rat:',
31-
':tiger:',
32-
':tropical_fish:',
33-
]
34-
3516

3617
def parse_args() -> argparse.Namespace:
3718
parser = argparse.ArgumentParser()
@@ -80,22 +61,23 @@ def main():
8061

8162
def hello_world(console: Console):
8263
tree_of_live = Tree("thinking")
64+
emojis = [':baby_chick:', ':blowfish:', ':dog:', ':elephant:', ':gorilla:', ':pig:', ]
8365
with Live(tree_of_live, refresh_per_second=4) as display:
8466
for _ in range(2, 5):
85-
node = tree_of_live.add(random.choice(EMOJIS) + ' ' + uuid.uuid4().hex)
67+
node = tree_of_live.add(random.choice(emojis) + ' ' + uuid.uuid4().hex)
8668
for i1 in range(randrange(1, 2)):
87-
sub_node = node.add(random.choice(EMOJIS) + ' ' + uuid.uuid4().hex)
69+
sub_node = node.add(random.choice(emojis) + ' ' + uuid.uuid4().hex)
8870
for j in range(randrange(2, 4)):
89-
sub_sub_node = sub_node.add(random.choice(EMOJIS) + ' ' + uuid.uuid4().hex)
71+
sub_sub_node = sub_node.add(random.choice(emojis) + ' ' + uuid.uuid4().hex)
9072
for k in range(randrange(2, 4)):
91-
sub_sub_node.add(random.choice(EMOJIS) + ' ' + uuid.uuid4().hex)
73+
sub_sub_node.add(random.choice(emojis) + ' ' + uuid.uuid4().hex)
9274
time.sleep(0.5)
9375
display.update(tree_of_live)
9476
for _ in track(range(42), description="asking..."):
9577
time.sleep(0.1)
96-
console.print(''.join([random.choice(EMOJIS) for _ in EMOJIS]))
78+
console.print(''.join([random.choice(emojis) for _ in emojis]))
9779
import this
98-
console.print(''.join([random.choice(EMOJIS) for _ in EMOJIS]))
80+
console.print(''.join([random.choice(emojis) for _ in emojis]))
9981
result = 0x17, 0o23
10082
this.i, this.s = result
10183
inspect(this.i + this.s)

0 commit comments

Comments
 (0)