Skip to content

Commit

Permalink
replace .split('/') with os.path.split
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-urban committed Aug 12, 2024
1 parent 29890ae commit 67e1c55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 61 deletions.
8 changes: 4 additions & 4 deletions src/pymodule/mkdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@ def get_ignore_doc(header):
else:
prg.set_postfix_str(header)

filename = header.split("/")[-1]
output_path = "/".join(header.split("/")[:-1]) + "/.docstrings/" + \
filepath, filename = os.path.split(header)
output_path = str(filepath) + "/.docstrings/" + \
filename.replace(filename.split('.')[-1], "doc.hpp")

if FORCE_RENEW:
try:
shutil.rmtree("/".join(output_path.split('/')[:-1]))
shutil.rmtree(os.path.split(output_path)[0])
except:
pass
continue
os.makedirs("/".join(output_path.split('/')[:-1]), exist_ok=True)
os.makedirs(os.path.split(output_path)[0], exist_ok=True)

add_doc_line(header, output_path)

Expand Down
57 changes: 0 additions & 57 deletions src/themachinethatgoesping/navigation/make_pch.py

This file was deleted.

0 comments on commit 67e1c55

Please sign in to comment.