@@ -90,9 +90,9 @@ def compareLists():
90
90
):
91
91
nUnfollorers += 1
92
92
print (
93
- f""" { (len (str (len (followings )))- len (str (nUnfollorers ))) * ' ' } { nUnfollorers } . { Fore .RED } { Style .BRIGHT }
94
- { following .upper ()} { Style .RESET_ALL } { (len (max (followings ))+ 2 - len (following )) * ' ' }
95
- doesn't follow you back."" "
93
+ f"{ (len (str (len (followings )))- len (str (nUnfollorers ))) * ' ' } { nUnfollorers } . { Fore .RED } { Style .BRIGHT } "
94
+ f" { following .upper ()} { Style .RESET_ALL } { (len (max (followings ))+ 2 - len (following )) * ' ' } "
95
+ " doesn't follow you back."
96
96
)
97
97
98
98
if nUnfollorers == 0 :
@@ -121,36 +121,40 @@ def about():
121
121
)
122
122
123
123
124
- actions = {
125
- "Find unfollowers" : compareLists ,
126
- "Print whitelist" : printWhitelist ,
127
- "About" : about ,
128
- f"{ Fore .RED } Exit{ Fore .RESET } " : exit ,
129
- }
124
+ def main ():
125
+ actions = {
126
+ "Find unfollowers" : compareLists ,
127
+ "Print whitelist" : printWhitelist ,
128
+ "About" : about ,
129
+ f"{ Fore .RED } Exit{ Fore .RESET } " : exit ,
130
+ }
130
131
131
- prevInputInvalid = 0
132
- while 1 :
133
- clearCLI ()
132
+ prevInputInvalid = 0
133
+ while 1 :
134
+ clearCLI ()
134
135
135
- # Print all the actions
136
- for n , i in enumerate (actions .keys ()):
137
- print (f" { n + 1 } . { Style .BRIGHT } { i } { Style .RESET_ALL } " )
138
- print ()
136
+ # Print all the actions
137
+ for n , i in enumerate (actions .keys ()):
138
+ print (f" { n + 1 } . { Style .BRIGHT } { i } { Style .RESET_ALL } " )
139
+ print ()
139
140
140
- # Print something if the previrous input was not valid
141
- if prevInputInvalid :
142
- printColored ("Invalid input!" , Fore .RED )
143
- prevInputInvalid = 0
141
+ # Print something if the previrous input was not valid
142
+ if prevInputInvalid :
143
+ printColored ("Invalid input!" , Fore .RED )
144
+ prevInputInvalid = 0
144
145
145
- # Ask and run user input
146
- try :
147
- selection = (
148
- int (input (f"{ Fore .YELLOW } Select what you wanna do: { Fore .RESET } " )) - 1
149
- )
150
- clearCLI ()
151
- tuple (actions .values ())[selection ]()
152
- input (
153
- f"{ Fore .YELLOW } { Style .DIM } \n (Press ENTER to go back to menu){ Style .RESET_ALL } "
154
- )
155
- except (IndexError , ValueError ):
156
- prevInputInvalid = 1
146
+ # Ask and run user input
147
+ try :
148
+ selection = (
149
+ int (input (f"{ Fore .YELLOW } Select what you wanna do: { Fore .RESET } " )) - 1
150
+ )
151
+ clearCLI ()
152
+ tuple (actions .values ())[selection ]()
153
+ input (
154
+ f"{ Fore .YELLOW } { Style .DIM } \n (Press ENTER to go back to menu){ Style .RESET_ALL } "
155
+ )
156
+ except (IndexError , ValueError ):
157
+ prevInputInvalid = 1
158
+
159
+
160
+ main ()
0 commit comments