fix: alllow trailing space in openapi schema diff

This commit is contained in:
drbh 2024-07-02 20:22:24 +00:00
parent 2d0bd1ab6d
commit fc2ce1cec1

View File

@ -146,7 +146,15 @@ def check_openapi(check: bool):
if check: if check:
diff = subprocess.run( diff = subprocess.run(
["diff", tmp_filename, filename], capture_output=True [
"diff",
# allow for trailing whitespace since it's not significant
# and the precommit hook will remove it
"--ignore-trailing-space",
tmp_filename,
filename,
],
capture_output=True,
).stdout.decode() ).stdout.decode()
os.remove(tmp_filename) os.remove(tmp_filename)