-
Notifications
You must be signed in to change notification settings - Fork 419
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
General cleanup of code #2273
Comments
Yeah, the question is identifying what should be removed. |
At least the code pieces commented with Python 2, which I already removed and pushed. Maybe 'Upgrade code to Python 3 style' is a better title, in order to upgrade strings to f-strings with pyupgrade as well and upgrade remaining strings manually.
|
In addition to that, I also suggest a switch to double-quoted strings "" instead of '', and an upgrade to the insanely fast |
These seem reasonable, but let's defer this until after 1.11.1 goes out, which should be in a week. Then I have a bunch of changes to improve the imports loops, except for the big one of calling the UI from logitech_receiver. |
I think the mentioned issues have already been implemented. However, when adapting the title to clean up, it could target
|
The advice I have received is that the license notice should be at the top of each file. It's probably overkill but that is what I have been told. |
Yes, it is and it is not beneficial for development and leads to some irritation for me. It is obvious, that there's no real plan for maintaining them, since most of the years date back to 2012-2013. This needs a plan and the best is to remove unnecessary duplication and ambiguous years from the individual files.
|
The important part of this section is the license. The code is Solaar uses the GPL and this can't be changed and should be prominently mentioned in each file. It is true that the copyright line has not been updated. I'm now putting new information in for the files that I am touching. |
Good, then a cleanup and unification would be to replace all existing ones with that timeless message, as 90% of them are dated. |
This needs a pre-commit hook then, otherwise it will never be up-to-date. |
The copyright lines are the least important part of the license block, or so I understand. Having them be out of date is not ideal but doesn't invalidate the license. |
Sure, but there's certainly a nice handy tool to maintain it. Or, I would not even add a date at all anymore. |
Related pwr-Solaar#2273
Related pwr-Solaar#2273
The basic files in root often use all capitals, as is already used for readme and manifest. Related pwr-Solaar#2273
Enum is represented as special string, use enum value for config file Fixes pwr-Solaar#2700 Related pwr-Solaar#2273
Enforce use of enum value. Fixes pwr-Solaar#2700 Related pwr-Solaar#2273
- Move validators into their own module. - Convert Kind to IntEnum Related pwr-Solaar#2273
Classes shouldn't don't need to know about other settings classes. Related pwr-Solaar#2273
Enforce create_widgets and collect_values. Related pwr-Solaar#2273
Refactor code related to task and task ID. Related pwr-Solaar#2273
Related pwr-Solaar#2273
The key flags are solely used in hiddpp20 module, thus put them into the module. Related pwr-Solaar#2273
Related pwr-Solaar#2273
This data is not in use currently. Related pwr-Solaar#2273
The mapping flags are solely used in hiddpp20 module, thus put them into this module. Related pwr-Solaar#2273
The charge status is solely used in the hiddpp20 module, thus put it into this module. Related pwr-Solaar#2273
Ensure behavior stays the same. Related pwr-Solaar#2273
Information
Is your feature request related to a problem? Please describe.
The text was updated successfully, but these errors were encountered: