From 48fd831dc7ce959d159304244ad0aaf058c84f1d Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 19 Jan 2022 19:35:29 -0800 Subject: [PATCH] Use niceprints.equals_header. --- directory_discrepancy.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/directory_discrepancy.py b/directory_discrepancy.py index 9f81343..4e7b3af 100644 --- a/directory_discrepancy.py +++ b/directory_discrepancy.py @@ -16,6 +16,7 @@ import sys from voussoirkit import betterhelp from voussoirkit import pathclass +from voussoirkit import niceprints from voussoirkit import operatornotify from voussoirkit import spinal from voussoirkit import vlogging @@ -33,15 +34,13 @@ def directory_discrepancy_argparse(args): files1 = set(helper(args.dir1, recurse=args.recurse)) files2 = set(helper(args.dir2, recurse=args.recurse)) - print(f'In "{args.dir1}" but not in "{args.dir2}":') - print('=============================') + print(niceprints.equals_header(f'In "{args.dir1}" but not in "{args.dir2}"')) for discrepancy in sorted(files1.difference(files2)): print(discrepancy) print() - print(f'In "{args.dir2}" but not in "{args.dir1}":') - print('=============================') + print(niceprints.equals_header(f'In "{args.dir2}" but not in "{args.dir1}"')) for discrepancy in sorted(files2.difference(files1)): print(discrepancy)