-
Notifications
You must be signed in to change notification settings - Fork 45.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
write_to_file arguments are printed on a single line, which is hard to read #2302
Comments
Fixed by #2421 |
Can you print multiple lines by changing the code to f"ARGUMENTS = {Fore.CYAN} {arguments} {Style.RESET_ALL}" |
Can you print multiple lines by changing the code to f"ARGUMENTS = {Fore.CYAN} {arguments} {Style.RESET_ALL}" |
I think it can be done but the code won't be pretty. The problem is ,when python sees \n strings in a dictionary it replaces the new line \n with a literal \ and n in the f string. Maybe some kinda complex re split might do the trick. |
FWIW, I think that should be easy to fix up - but not sure if it's important, there's probably more than just one UI in the pipeline anyway, so probably not a good idea to expend time/energy on cosmetics like these (?) Admittedly, I did patch up the update_file work to visualize changes using a diff format though (#4079): In general however, I think it's worth keeping in mind that there's going to be more than one frontend "soonish" (just look at the REST PR) - all these frontends will merely need the data, no need to bother with formatting etc. Once the data is available, providing a UI on top of pretty straightforward. |
This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days. |
This issue was closed automatically because it has been stale for 10 days with no activity. |
Duplicates
Summary 💡
When the current COMMAND is write_to_file (and possibly others), large multiline arguments should be printed as multiple lines for readability.
Examples 🌈
Current behavior:
Expected behavior (or something similar):
Motivation 🔦
Currently, the arguments for NEXT ACTION are a simple json dump, which combines all the lines into a single long string.
I'd like to be able to review what write_to_file is doing, which is difficult when the text isn't formatted.
The text was updated successfully, but these errors were encountered: