Skip to content

fix: original and destination is not a Path object #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"""

if not sas_dir.exists():
print(f"源文件夹 {sas_dir} 不存在。")
print(f'源文件夹 "{sas_dir.absolute()}" 不存在。')

Check warning on line 145 in submit.py

View check run for this annotation

Codecov / codecov/patch

submit.py#L145

Added line #L145 was not covered by tests
return
if not txt_dir.exists():
txt_dir.mkdir(parents=True)
Expand Down Expand Up @@ -250,20 +250,20 @@
parser_dir.add_argument("-exf", "--exclude-files", nargs="*", default=None, help="排除文件列表(默认无)")
parser_dir.add_argument("-exd", "--exclude-dirs", nargs="*", default=None, help="排除目录列表(默认无)")

args = parser.parse_args()
args = parser.parse_args(["copydir", "./05 TFL程序/01 主程序", "./11 数据递交文件/03 程序代码/02 TFL"])

if args.command == "copyfile":
copy_file(
sas_file=args.sas_file,
txt_file=args.txt_file,
sas_file=Path(args.sas_file),
txt_file=Path(args.txt_file),
convert_mode=args.convert_mode,
macro_subs=args.macro_subs,
encoding=args.encoding,
)
elif args.command == "copydir":
copy_directory(
sas_dir=args.sas_dir,
txt_dir=args.txt_dir,
sas_dir=Path(args.sas_dir),
txt_dir=Path(args.txt_dir),
merge=args.merge,
convert_mode=args.convert_mode,
macro_subs=args.macro_subs,
Expand Down