|
28 | 28 | from eduvpn.settings import FLAG_PREFIX, IMAGE_PREFIX |
29 | 29 | from eduvpn.ui import search |
30 | 30 | from eduvpn.ui.stats import NetworkStats |
31 | | -from eduvpn.ui.utils import (QUIT_ID, get_validity_text, link_markup, |
32 | | - should_show_error, show_error_dialog, |
33 | | - show_ui_component, style_widget) |
34 | | -from eduvpn.utils import (ERROR_STATE, get_prefix, get_ui_state, log_exception, |
35 | | - run_in_background_thread, run_in_glib_thread, |
36 | | - run_periodically, ui_transition) |
| 31 | +from eduvpn.ui.utils import ( |
| 32 | + QUIT_ID, |
| 33 | + get_validity_text, |
| 34 | + link_markup, |
| 35 | + should_show_error, |
| 36 | + show_error_dialog, |
| 37 | + show_ui_component, |
| 38 | + style_widget, |
| 39 | +) |
| 40 | +from eduvpn.utils import ( |
| 41 | + ERROR_STATE, |
| 42 | + get_prefix, |
| 43 | + get_ui_state, |
| 44 | + log_exception, |
| 45 | + run_in_background_thread, |
| 46 | + run_in_glib_thread, |
| 47 | + run_periodically, |
| 48 | + ui_transition, |
| 49 | +) |
37 | 50 |
|
38 | 51 | logger = logging.getLogger(__name__) |
39 | 52 |
|
@@ -485,7 +498,10 @@ def recreate_profile_combo(self, server_info) -> None: |
485 | 498 | active_profile = 0 |
486 | 499 | sorted_profiles = sorted(server_info.profiles.profiles, key=lambda p: str(p)) |
487 | 500 | for index, profile in enumerate(sorted_profiles): |
488 | | - if server_info.profiles.current is not None and profile.identifier == server_info.profiles.current.identifier: |
| 501 | + if ( |
| 502 | + server_info.profiles.current is not None |
| 503 | + and profile.identifier == server_info.profiles.current.identifier |
| 504 | + ): |
489 | 505 | active_profile = index |
490 | 506 | profile_store.append([str(profile), profile]) # type: ignore |
491 | 507 |
|
@@ -1209,7 +1225,10 @@ def on_profile_combo_changed(self, combo): |
1209 | 1225 | active_profile = 0 |
1210 | 1226 | sorted_profiles = sorted(profiles.profiles, key=lambda p: str(p)) |
1211 | 1227 | for index, profile in enumerate(sorted_profiles): |
1212 | | - if profiles.current is not None and profile.identifier == profiles.current.identifier: |
| 1228 | + if ( |
| 1229 | + profiles.current is not None |
| 1230 | + and profile.identifier == profiles.current.identifier |
| 1231 | + ): |
1213 | 1232 | active_profile = index |
1214 | 1233 |
|
1215 | 1234 | combo.set_active(active_profile) |
|
0 commit comments