Add suggestions from #246
This commit is contained in:
parent
fc06491b8c
commit
c3b07cf3dd
2
setup.py
2
setup.py
@ -15,7 +15,7 @@ setup(
|
||||
author="Daniel Rojas",
|
||||
# author_email='',
|
||||
description="Easily document cables and wiring harnesses",
|
||||
long_description=open(README_PATH).read(),
|
||||
long_description=README_PATH.read_text(),
|
||||
long_description_content_type="text/markdown",
|
||||
install_requires=[
|
||||
"click",
|
||||
|
||||
@ -97,7 +97,7 @@ def clean_generated(groupkeys):
|
||||
for filename in collect_filenames("Cleaning", key, generated_extensions):
|
||||
if filename.is_file():
|
||||
print(f' rm "{filename}"')
|
||||
Path(filename).unlink()
|
||||
filename.unlink()
|
||||
|
||||
|
||||
def compare_generated(groupkeys, branch="", include_graphviz_output=False):
|
||||
|
||||
@ -111,6 +111,8 @@ def wireviz(file, format, prepend, output_dir, output_name, version):
|
||||
prepend_file = Path(prepend_file)
|
||||
if not prepend_file.exists():
|
||||
raise Exception(f"File does not exist:\n{prepend_file}")
|
||||
if not prepend_file.is_file():
|
||||
raise Exception(f"Path is not a file:\n{prepend_file}")
|
||||
print("Prepend file:", prepend_file)
|
||||
|
||||
prepend_input += open_file_read(prepend_file).read() + "\n"
|
||||
@ -122,6 +124,8 @@ def wireviz(file, format, prepend, output_dir, output_name, version):
|
||||
file = Path(file)
|
||||
if not file.exists():
|
||||
raise Exception(f"File does not exist:\n{file}")
|
||||
if not file.is_file():
|
||||
raise Exception(f"Path is not a file:\n{file}")
|
||||
|
||||
# file_out = file.with_suffix("") if not output_file else output_file
|
||||
_output_dir = file.parent if not output_dir else output_dir
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user