Skip to content

Commit 5a786cc

Browse files
committed
[__main__] formatting changes, add comment documentation
1 parent b1752a4 commit 5a786cc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lib/fdiff/__main__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ def run(argv):
1919
# ===========================================================
2020
# argparse command line argument definitions
2121
# ===========================================================
22-
parser = argparse.ArgumentParser(description="An OpenType table diff tool for fonts.")
22+
parser = argparse.ArgumentParser(
23+
description="An OpenType table diff tool for fonts."
24+
)
2325
parser.add_argument(
2426
"--version", action="version", version="fdiff v{}".format(__version__)
2527
)
@@ -38,6 +40,10 @@ def run(argv):
3840

3941
args = parser.parse_args(argv)
4042

43+
#
44+
# File path argument validations
45+
#
46+
4147
if not file_exists(args.PREFILE):
4248
sys.stderr.write(
4349
f"[*] ERROR: The file path '{args.PREFILE}' can not be found.{os.linesep}"
@@ -49,6 +55,10 @@ def run(argv):
4955
)
5056
sys.exit(1)
5157

58+
#
59+
# Unified diff logic
60+
#
61+
5262
try:
5363
diff = u_diff(args.PREFILE, args.POSTFILE, context_lines=args.lines)
5464
except Exception as e:

0 commit comments

Comments
 (0)