-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
Reformatted codebase #325
Reformatted codebase #325
Conversation
All python scripts are now reformatted with 'black' using line length of 100.
Thanks for your contribution! I'm curious how and why did you settle on 100 instead of i.e: 80? |
80 is just too low, 100 is a better option I think, could be 160 as well, then we can say it's twice as much of what PEP-8 recommends. |
Makes sense and it looks good. Was thinking if we're doing this with code as part of this PR I would also change the output to be 100 instead of 80 characters long, i.e:
all of these are <= 80 but then most of the space would be empty and it won't look good if terminal is scaled below 100 characters, so let's keep as it is unless you have a better idea. |
I think we can use a function, that dynamically prints out messages in the above format considering the terminal size.
I'll check if there's room for improvement for this, update the scripts to use this and I'll submit this as a separate PR. |
This is exactly what I was thinking of and what would be ideal solution but didn't express it as an idea 🙂 However, code sample from above didn't dynamically scale anything, and |
What do you mean? I don't get it. I tried it on my work laptop (gnome + gnome terminal), when I posted the example here and it worked. Here's a demo of the command (I only removed the second function call As you can see, printouts change with every update if you modify the terminal size. Another demo with the example.py untouched: |
This the perfect summary right here. Since auto-cpufreq output is re-outputted every 5 seconds I think it would be great if output could be scaled like this. If you have time to implement this as part of auto-cpufreq and create a PR I'll gladly review it! |
Sure, I'm planning to do that. 🙂 |
Awesome, looking forward to that PR then 🙂 |
Changes live as part of v1.9.0 release. |
All python scripts are now reformatted with 'black' using line length
of 100.