From 64040e1b3d8b3f0acd31c294b2055e392209d53a Mon Sep 17 00:00:00 2001 From: Benjamin Olmstead Date: Wed, 20 Aug 2025 11:42:27 -0700 Subject: [PATCH 1/4] Adds standalone driver `emboss-format` for `compiler/front_end/format.py` --- embossformat | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 embossformat diff --git a/embossformat b/embossformat new file mode 100755 index 0000000..ccfc57e --- /dev/null +++ b/embossformat @@ -0,0 +1,34 @@ +#!/usr/bin/env python3 + +# Copyright 2025 Benjamin Olmstead +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Standalone driver program for the Emboss formatter.""" + +import argparse +import os +import sys + + +def main(argv): + base_path = os.path.dirname(__file__) or "." + sys.path.append(base_path) + + from compiler.front_end import format # pylint:disable=import-outside-toplevel + + return format.main(argv) + + +if __name__ == "__main__": + sys.exit(main(sys.argv)) From 1000a3ac852b8eb9a88925b047016c005bef61a9 Mon Sep 17 00:00:00 2001 From: Benjamin Olmstead Date: Wed, 20 Aug 2025 11:47:02 -0700 Subject: [PATCH 2/4] Correct script name. --- embossformat => emboss-format | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename embossformat => emboss-format (100%) diff --git a/embossformat b/emboss-format similarity index 100% rename from embossformat rename to emboss-format From c141316c8aa3b0627c6ef3b9c9bf4d3cf005dd58 Mon Sep 17 00:00:00 2001 From: Benjamin Olmstead Date: Thu, 28 Aug 2025 18:44:23 -0700 Subject: [PATCH 3/4] Simplify the script. --- emboss-format | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/emboss-format b/emboss-format index ccfc57e..098cbe4 100755 --- a/emboss-format +++ b/emboss-format @@ -20,15 +20,8 @@ import argparse import os import sys - -def main(argv): - base_path = os.path.dirname(__file__) or "." - sys.path.append(base_path) - - from compiler.front_end import format # pylint:disable=import-outside-toplevel - - return format.main(argv) +from compiler.front_end import format if __name__ == "__main__": - sys.exit(main(sys.argv)) + sys.exit(format.main(sys.argv)) From 579fb7a2c1ad03ee4541730e66f47e20cf7b2def Mon Sep 17 00:00:00 2001 From: Benjamin Olmstead Date: Fri, 29 Aug 2025 18:28:46 -0700 Subject: [PATCH 4/4] Remove unnecessary imports. --- emboss-format | 2 -- 1 file changed, 2 deletions(-) diff --git a/emboss-format b/emboss-format index 098cbe4..a0dd827 100755 --- a/emboss-format +++ b/emboss-format @@ -16,8 +16,6 @@ """Standalone driver program for the Emboss formatter.""" -import argparse -import os import sys from compiler.front_end import format