Skip to content

Commit

Permalink
Merge pull request #88 from GatorEducator/generate_repeat_lines_delete
Browse files Browse the repository at this point in the history
Generate repeat lines delete
  • Loading branch information
Michionlion authored Jun 21, 2022
2 parents 2b3f351 + bddfb62 commit 8b14ffb
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 47 deletions.
9 changes: 5 additions & 4 deletions gatorgrade/generate/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def create_targeted_paths_list(
for target in corrected_paths:
if target in complete_actual_path:
polished_paths = complete_actual_path.replace(
f"..{os.path.sep}", ""
).replace(f".{os.path.sep}", "")
f"{relative_run_path}{os.path.sep}", ""
)
targeted_paths.append(polished_paths)

# If any of the user inputted file does not exist in any directory,
Expand Down Expand Up @@ -95,13 +95,14 @@ def create_targeted_paths_list(
return targeted_paths


def write_yaml_of_paths_list(path_names, search_root): # expected input: A path list
def write_yaml_of_paths_list(
path_names: List[str], search_root: str
): # expected input: A path list
"""Write YAML file to create gatorgrade file and set default messages."""
files_list = []
# Create an empty list to store dictionaries
for file_path in path_names:
# Iterate through items in path_names
file_path = file_path.replace(f".{os.path.sep}", "")
if file_path.endswith(os.path.sep):
file_path = file_path[0:-1]
# Convert file separators to '/'
Expand Down
86 changes: 43 additions & 43 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8b14ffb

Please sign in to comment.