Skip to content
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

helper functions: improve append_hostname() and sort_nodes() #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 4, 2024

  1. helper functions: improve helper functions

    Problem: The function descriptions for append_hostname() and
    sort_nodes() could use some better descriptions. sort_nodes() as a
    whole could probably use some improvement via condensing it down.
    
    Edit the descriptions for both helper functions and remove the extra
    whitespace between the function description and the start of the
    function definition.
    
    In sort_nodes():
    
    - simplify the string processing by checking "nodelist" directly
    instead of assigning it to another variable.
    - add an extract_key() function to extract the prefix, numeric part,
    and suffix using regex and return a tuple of it.
    - use the returned tuple from extract_key() to sort the original
    nodelist by prefix, numeric part, and suffix.
    cmoussa1 committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    5b04fc2 View commit details
    Browse the repository at this point in the history