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.
This commit is contained in:
Paul Gauthier 2023-05-09 10:19:18 -07:00
parent 66058fd123
commit 1475e0d0fd

View file

@ -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()