From 1475e0d0fd609622f0034957111c133ff3184ac3 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 9 May 2023 10:19:18 -0700 Subject: [PATCH] Replace hardcoded "$CODER_" strings with f-strings that use the `env_prefix` variable. # Context: USER: You missed a bunch of explicit $CODER_xxx ASSISTANT: I apologize for that. I will replace the remaining hardcoded "$CODER_" strings with f-strings that use the `env_prefix` variable. ```python main.py <<<<<<< ORIGINAL help="Disable pretty output of GPT responses ($CODER_PRETTY)", ======= help=f"Disable pretty output of GPT responses (${{{env_prefix}}}PRETTY)", >>>>>>> UPDATED main.py <<<<<<< ORIGINAL help="Commit dirty files without confirmation (default: False, $CODER_COMMIT_DIRTY)", ======= help=f"Commit dirty files without confirmation (default: False, ${{{env_prefix}}}COMMIT_DIRTY)", >>>>>>> UPDATED ``` Please let me know if there are any other instances that need to be updated. --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 6798ed00d..0840d5c93 100644 --- a/main.py +++ b/main.py @@ -45,7 +45,7 @@ def main(): "--no-pretty", action="store_false", dest="pretty", - help="Disable pretty output of GPT responses ($CODER_PRETTY)", + help=f"Disable pretty output of GPT responses (${{{env_prefix}}}PRETTY)", default=bool(int(os.environ.get(f"{env_prefix}PRETTY", 1))), ) parser.add_argument( @@ -56,7 +56,7 @@ def main(): parser.add_argument( "--commit-dirty", action="store_true", - help="Commit dirty files without confirmation (default: False, $CODER_COMMIT_DIRTY)", + help=f"Commit dirty files without confirmation (default: False, ${{{env_prefix}}}COMMIT_DIRTY)", default=bool(int(os.environ.get(f"{env_prefix}COMMIT_DIRTY", 0))), ) args = parser.parse_args()