Skip to content

Commit

Permalink
fix:jans-cli add doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelwahabAdam committed Sep 19, 2022
1 parent 508539c commit 68d366b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion jans-cli-tui/plugins/010_oxauth/edit_client_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, parent, title, data, buttons=[], save_handler=None):
title (str): The Main dialog title
data (list): selected line data
button_functions (list, optional): Dialog main buttons with their handlers. Defaults to [].
save_handler (method, optional): _description_. Defaults to None.
save_handler (method, optional): handler invoked when closing the dialog. Defaults to None.
"""
super().__init__(parent, title, buttons)
self.save_handler = save_handler
Expand Down
2 changes: 1 addition & 1 deletion jans-cli-tui/plugins/010_oxauth/edit_scope_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, parent, title, data, buttons=[], save_handler=None):
title (str): The Main dialog title
data (list): selected line data
button_functions (list, optional): Dialog main buttons with their handlers. Defaults to [].
save_handler (method, optional): _description_. Defaults to None.
save_handler (method, optional): handler after closing the dialog. Defaults to None.
"""
super().__init__(parent, title, buttons)
self.save_handler = save_handler
Expand Down
27 changes: 18 additions & 9 deletions jans-cli-tui/plugins/010_oxauth/view_uma_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@
Label,
RadioList,
TextArea,
CheckboxList,
Shadow,
)
)
from wui_components.jans_dialog_with_nav import JansDialogWithNav
from wui_components.jans_nav_bar import JansNavBar
from wui_components.jans_side_nav_bar import JansSideNavBar
Expand All @@ -58,8 +56,22 @@


class ViewUMADialog(JansGDialog, DialogUtils):
"""The Main UMA-resources Dialog to view UMA Resource Details
"""

def __init__(self, parent, title, data, buttons=[], save_handler=None):
"""init for `ViewUMADialog`, inherits from two diffrent classes `JansGDialog` and `DialogUtils`
JansGDialog (dialog): This is the main dialog Class Widget for all Jans-cli-tui dialogs except custom dialogs like dialogs with navbar
DialogUtils (methods): Responsable for all `make data from dialog` and `check required fields` in the form for any Edit or Add New
Args:
parent (widget): This is the parent widget for the dialog
title (str): The Main dialog title
data (list): selected line data
button_functions (list, optional): Dialog main buttons with their handlers. Defaults to [].
save_handler (method, optional): handler invoked when closing the dialog. Defaults to None.
"""

super().__init__(parent, title, buttons)
self.save_handler = save_handler
Expand Down Expand Up @@ -152,9 +164,9 @@ def cancel():
# width=140,
)


def UMA_prepare_containers(self):

"""Prepare the containers for UMA Dialog
"""
self.oauth_main_area = self.UMA_containers['scope'] = HSplit([
self.myparent.getTitledText(
_("Scopes"),
Expand All @@ -179,11 +191,8 @@ def UMA_prepare_containers(self):

],width=D())




def oauth_nav_selection_changed(self, selection):
"""This method for the selection change
"""This method for the selection change for tabs
Args:
selection (str): the current selected tab
Expand Down

0 comments on commit 68d366b

Please sign in to comment.