utils

The utils module provides utility functions for general operations.

Functions

wikirepo.utils._make_var_list(var)[source]

Allows for a one line check for if a variable is a list.

wikirepo.utils._return_given_type(var, var_was_str)[source]

Allows for a one line return or list or string variables.

wikirepo.utils.try_float(string)[source]

Checks if a string is a float.

wikirepo.utils.round_if_int(val)[source]

Rounds off the decimal of a value if it is an integer float.

wikirepo.utils.gen_list_of_lists(original_list, new_structure)[source]

Generates a list of lists with a given structure from a given list.

wikirepo.utils.check_str_similarity(str_1, str_2)[source]

Checks the similarity of two strings.

wikirepo.utils.check_str_args(arguments, valid_args)[source]

Checks whether a str argument is valid, and makes suggestions if not.