added TODO comments

This commit is contained in:
2025-10-02 15:40:36 +02:00
parent f4f5f9bc6b
commit e8ef3c6e53
3 changed files with 31 additions and 13 deletions

View File

@@ -1,4 +1,3 @@
from logging import log
import os
from pathlib import Path
import sys
@@ -102,13 +101,17 @@ class Refit_Create:
def input_validator(self):
"""Function, which checks if the user input is valid"""
# !!!TODO: make the function return true for the check and only continue the decider if the validation check
# passes
# NOTE: find a way on how to return 'True' when the user input
# is valid
# Check working directory
if self.input is None:
self.input = librefit.get_current_path(self.input)
logger.info("FUNC: input_validator() MSG: No directory passed to the command, continue with current directory")
logger.info(
"FUNC: input_validator() MSG: No directory passed to the command, continue with current directory"
)
# Exit the program if the -n argument is not passed
if self.n is None:
logger.error(
@@ -116,18 +119,16 @@ class Refit_Create:
)
print("Use the '-n' flag for the create command.")
sys.exit(1)
def rf_create_decider(self):
"""Coordination of the 'create' sub command"""
logger.debug("FUNC: rf_create_decider() MSG: Entered decider function")
# !!!ToDo: implement input_validator()
# WARNING: implement the input validator and only continue with
# the decider if the validator returns true
if self.input_validator():
logger.debug("yippie")
# Exits the program if recursive and filemode flags are set at the same time
if self.filemode:
logger.debug("DECISION filemode set, creating files instead of folders")
@@ -137,7 +138,6 @@ class Refit_Create:
logger.error("Recursive and filemode don´t work together.")
print("Recursive and filemode don´t work together.")
if self.recursive is None:
self.create_n_folders(self.n, self.input, self.name)
else: