cleanup
This commit is contained in:
@@ -153,11 +153,11 @@ def get_current_path(path) -> str:
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
# TODO: - add dynamic name input
|
||||
# - add docstring
|
||||
def create_linear_directories(input_path, target_depth, current_depth):
|
||||
"""Creates the linear directories for the x*y pattern"""
|
||||
|
||||
# TODO: - add dynamic name input
|
||||
# - add docstring
|
||||
logger.debug(
|
||||
f"FUNC: create_linear_directories(entered) VALUES: path='{input_path}', target_depth='{target_depth}', current_depth='{current_depth}'"
|
||||
)
|
||||
@@ -173,24 +173,29 @@ def create_linear_directories(input_path, target_depth, current_depth):
|
||||
|
||||
os.mkdir(path)
|
||||
|
||||
create_linear_directories(path, target_depth, current_depth + 1)
|
||||
create_linear_directories(
|
||||
path,
|
||||
target_depth,
|
||||
current_depth + 1,
|
||||
)
|
||||
|
||||
|
||||
# TODO: - add dynamic name input
|
||||
# - add docstring
|
||||
def create_parallel_directories(input_path, target_depth, width):
|
||||
"""Creates directories after the pattern x*y"""
|
||||
|
||||
# TODO: - add dynamic name input
|
||||
# - add docstring
|
||||
logger.debug(
|
||||
f"FUNC: create_parallel_directories(entered) VALUES: path='{input_path}', target_depth='{target_depth}', width='{width}'"
|
||||
)
|
||||
|
||||
# # Getting the lenth of the number string which gets addedto the dir name.
|
||||
# length_width = get_int_length(width)
|
||||
|
||||
for i in range(width):
|
||||
directory_name = "branch_" + get_standard_name_number(i, get_int_length(width))
|
||||
path = os.path.join(input_path, directory_name)
|
||||
os.mkdir(path)
|
||||
|
||||
create_linear_directories(path, target_depth, current_depth=0)
|
||||
create_linear_directories(
|
||||
path,
|
||||
target_depth,
|
||||
current_depth=0,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user