New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/SOF 7352 #123
feature/SOF 7352 #123
Conversation
VsevolodX
commented
May 9, 2024
- update: add a prompt
- update: add interactive mode for selection of t
- update: fix to work
- update: rename and return the object
- chore: import made from github
- chore: fid
- chore: import made from github
- update: sync and async functionality
- update: use new io
- update: write the only way that this works in both python and pyodide
- chore: update
- chore: explain the wheel server usage
- update: refactor to remove duplication
- update: display cells in natural size
- chore: minor adjustemtns
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
||
|
||
def user_select_array_element_by_index( | ||
array: List[Any], element_name: str = "element", prompt_head: Optional[str] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstring here and below
utils/io.py
Outdated
return prompt_head + prompt_body | ||
|
||
|
||
def process_selected_index(selected_index_str: str, array: List[Any], element_name: str) -> Any: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it actually do??
utils/io.py
Outdated
return array[selected_index] | ||
|
||
|
||
def user_select_array_element_by_index( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ui_prompt_select_array_element_by_index
utils/io.py
Outdated
) -> Any: | ||
prompt_text = create_prompt_text(array, element_name, prompt_head) | ||
selected_index_str = input(prompt_text) | ||
result = process_selected_index(selected_index_str, array, element_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index = get_integer_value_from_prompt(input(prompt_text))
result = array[index]
39fc280
to
3e51a12
Compare