Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
clive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
clive
Commits
f59f142d
Commit
f59f142d
authored
1 month ago
by
Mateusz Żebrak
Browse files
Options
Downloads
Patches
Plain Diff
Remove dead code related to skipping screens
parent
f75968cf
No related branches found
No related tags found
2 merge requests
!600
v1.27.5.21 Release
,
!558
Remove welcome profile from TUIWorld, set TUIWorld profile during CreateProfile wizard instead
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
clive/__private/ui/forms/create_profile/create_profile_form.py
+0
-9
0 additions, 9 deletions
.../__private/ui/forms/create_profile/create_profile_form.py
clive/__private/ui/forms/form.py
+0
-20
0 additions, 20 deletions
clive/__private/ui/forms/form.py
with
0 additions
and
29 deletions
clive/__private/ui/forms/create_profile/create_profile_form.py
+
0
−
9
View file @
f59f142d
...
...
@@ -31,12 +31,3 @@ class CreateProfileForm(Form[CreateProfileContext]):
def
_rebuild_context
(
self
)
->
None
:
profile
=
Profile
.
create
(
WELCOME_PROFILE_NAME
)
self
.
__context
=
CreateProfileContext
(
profile
,
Node
(
profile
))
def
_skip_during_push_screen
(
self
)
->
list
[
ScreenBuilder
[
CreateProfileContext
]]:
screens_to_skip
:
list
[
ScreenBuilder
[
CreateProfileContext
]]
=
[]
# skip NewKeyAliasForm if there is no working account set
if
not
self
.
context
.
profile
.
accounts
.
has_working_account
:
screens_to_skip
.
append
(
NewKeyAliasFormScreen
)
return
screens_to_skip
This diff is collapsed.
Click to expand it.
clive/__private/ui/forms/form.py
+
0
−
20
View file @
f59f142d
...
...
@@ -21,7 +21,6 @@ class Form(Contextual[ContextT], CliveScreen[None]):
def
__init__
(
self
)
->
None
:
self
.
_current_screen_index
=
0
self
.
_screens
:
list
[
ScreenBuilder
[
ContextT
]]
=
[
*
list
(
self
.
register_screen_builders
())]
self
.
_skipped_screens
:
set
[
ScreenBuilder
[
ContextT
]]
=
set
()
assert
len
(
self
.
_screens
)
>=
self
.
MINIMUM_SCREEN_COUNT
,
"
Form must have at least 2 screens
"
self
.
_rebuild_context
()
self
.
_post_actions
=
Queue
[
PostAction
]()
...
...
@@ -40,20 +39,12 @@ class Form(Contextual[ContextT], CliveScreen[None]):
assert
self
.
_current_screen_index
==
0
self
.
_push_current_screen
()
def
_skip_during_push_screen
(
self
)
->
list
[
ScreenBuilder
[
ContextT
]]:
return
[]
def
next_screen
(
self
)
->
None
:
if
not
self
.
_check_valid_range
(
self
.
_current_screen_index
+
1
):
return
self
.
_current_screen_index
+=
1
if
self
.
_is_current_screen_to_skip
():
self
.
_skipped_screens
.
add
(
self
.
current_screen
)
self
.
next_screen
()
return
self
.
_push_current_screen
()
def
previous_screen
(
self
)
->
None
:
...
...
@@ -62,20 +53,9 @@ class Form(Contextual[ContextT], CliveScreen[None]):
self
.
_current_screen_index
-=
1
if
self
.
_is_current_screen_skipped
():
self
.
_skipped_screens
.
discard
(
self
.
current_screen
)
self
.
previous_screen
()
return
# self.dismiss() won't work here because self is Form and not FormScreen
self
.
app
.
pop_screen
()
def
_is_current_screen_to_skip
(
self
)
->
bool
:
return
self
.
current_screen
in
self
.
_skip_during_push_screen
()
def
_is_current_screen_skipped
(
self
)
->
bool
:
return
self
.
current_screen
in
self
.
_skipped_screens
def
_push_current_screen
(
self
)
->
None
:
self
.
app
.
push_screen
(
self
.
current_screen
(
self
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment