refactor librefit and added docstrings

This commit is contained in:
2025-09-30 20:56:27 +02:00
parent a0f2f83a8a
commit efcec653cb
5 changed files with 46 additions and 24 deletions

View File

@@ -1,7 +1,7 @@
from .refit_logger import logger
def get_standard_name_number(current_number, number_str_length):
def get_standard_name_number(current_number: str, number_str_length: int) -> str:
"""Returns a number string filled to the length of the input number
This function returns the number in a standartized way as a string.
@@ -9,7 +9,7 @@ def get_standard_name_number(current_number, number_str_length):
number which determines the length of the string.
Args:
current_number (int): The current number of the item.
current_number (str): The current number of the item.
number_str_length (int): The length of the string which gets returned.
Examples:
@@ -29,7 +29,7 @@ def get_standard_name_number(current_number, number_str_length):
return standard_name_number
def get_standard_folder_name(name) -> str:
def get_standard_folder_name(name: str) -> str:
"""Returnes a standard name either from a list or the default value.
This function sanitizes the input, which gets passed as a list or None from