Skip to content
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

fix: Offline components and runners not manageable #2962

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

koplo199
Copy link
Contributor

@koplo199 koplo199 commented Jul 13, 2023

Description

Reported fixes:

Unreported fixes:

  • Fixes related to Proton being confused as a type where it's a name/prefix and vice versa.
  • Fixes and optimizations related to runners/components ordering/sorting.
  • Refactoring in preferences.py for less duplicate code.
  • Other minor fixes

Notably, finally gives Kron4ek builds some love with a proper title and description. Those builds are updated regularly, integrated with the CI, and were responsible for 99% of the builds in Other (the 1% being old broken release which will be removed soon in the components repository), giving them a proper description makes sense.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.

  • Tested on a local build.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 13, 2023

Pylint result on modfied files:
************* Module bottles.backend.runner
bottles/backend/runner.py:44:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/runner.py:85:8: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/runner.py:35:0: R0903: Too few public methods (1/2) (too-few-public-methods)
************* Module bottles.backend.managers.manager
bottles/backend/managers/manager.py:1:0: C0302: Too many lines in module (1563/1000) (too-many-lines)
bottles/backend/managers/manager.py:404:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:823:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:1471:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:1471:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:150:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:150:19: C0103: Variable name "t" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:154:16: C0103: Variable name "t" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:162:8: C0103: Variable name "rv" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:167:8: W0106: Expression "self.check_dxvk(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:170:8: W0106: Expression "self.check_vkd3d(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:173:8: W0106: Expression "self.check_nvapi(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:176:8: W0106: Expression "self.check_latencyflex(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:179:8: W0106: Expression "self.check_runtimes(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:182:8: W0106: Expression "self.check_winebridge(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:185:8: W0106: Expression "self.check_runners(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:363:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:367:22: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/managers/manager.py:372:31: C0207: Use version.split('\n', maxsplit=1)[0] instead (use-maxsplit-arg)
bottles/backend/managers/manager.py:392:12: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/managers/manager.py:392:16: C0103: Variable name "r" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:402:25: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
bottles/backend/managers/manager.py:406:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:452:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:452:40: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:479:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:479:44: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:598:25: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
bottles/backend/managers/manager.py:603:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:676:8: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:704:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:721:16: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/manager.py:794:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:794:48: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:855:16: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:868:16: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:877:16: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:878:16: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:901:12: C0103: Variable name "b" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:902:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:909:25: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
bottles/backend/managers/manager.py:918:4: R0913: Too many arguments (7/5) (too-many-arguments)
bottles/backend/managers/manager.py:943:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:980:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/managers/manager.py:981:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:993:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1001:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1008:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1015:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1025:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1043:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1049:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1055:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1062:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1065:29: C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
bottles/backend/managers/manager.py:1073:4: R0913: Too many arguments (14/5) (too-many-arguments)
bottles/backend/managers/manager.py:1175:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1192:8: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/manager.py:1204:12: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/manager.py:1201:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:1201:84: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:1241:8: C0103: Variable name "rk" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:1251:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1255:15: W0125: Using a conditional statement with a constant value (using-constant-test)
bottles/backend/managers/manager.py:1250:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:1250:8: R1702: Too many nested blocks (7/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:1250:8: R1702: Too many nested blocks (7/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:1335:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:1335:54: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:1485:8: W1510: 'subprocess.run' used without explicitly defining the value for 'check'. (subprocess-run-check)
bottles/backend/managers/manager.py:1524:4: R0913: Too many arguments (7/5) (too-many-arguments)
bottles/backend/managers/manager.py:77:0: R0904: Too many public methods (24/20) (too-many-public-methods)
************* Module bottles.backend.utils.steam
bottles/backend/utils/steam.py:42:30: C0103: Argument name "fp" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/steam.py:57:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/steam.py:57:12: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/utils/steam.py:57:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
************* Module bottles.backend.utils.generic
bottles/backend/utils/generic.py:95:80: W1401: Anomalous backslash in string: '\d'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
bottles/backend/utils/generic.py:92:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/generic.py:105:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/generic.py:105:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/generic.py:87:4: W0702: No exception type(s) specified (bare-except)
bottles/backend/utils/generic.py:80:8: C0415: Import outside toplevel (ctypes) (import-outside-toplevel)
************* Module bottles.frontend.views.preferences
bottles/frontend/views/preferences.py:32:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:34:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:122:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:123:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:124:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:125:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:126:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:127:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:23:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/views/preferences.py:139:12: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/views/preferences.py:157:29: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:157:37: W0613: Unused argument 'state' (unused-argument)
bottles/frontend/views/preferences.py:163:35: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:163:43: W0613: Unused argument 'state' (unused-argument)
bottles/frontend/views/preferences.py:166:26: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:166:34: W0613: Unused argument 'state' (unused-argument)
bottles/frontend/views/preferences.py:169:38: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:172:36: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:196:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/frontend/views/preferences.py:216:35: W0613: Unused argument 'widget' (unused-argument)
************* Module bottles.frontend.widgets.component
bottles/frontend/widgets/component.py:93:45: W0511: TODO: unimplemented (fixme)
bottles/frontend/widgets/component.py:32:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/widgets/component.py:34:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/widgets/component.py:36:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/widgets/component.py:37:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/widgets/component.py:75:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/widgets/component.py:139:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/widgets/component.py:21:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/widgets/component.py:86:35: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/widgets/component.py:84:23: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/widgets/component.py:106:27: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/widgets/component.py:104:24: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/widgets/component.py:122:25: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/widgets/component.py:130:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
bottles/frontend/widgets/component.py:170:0: R0903: Too few public methods (0/2) (too-few-public-methods)

@koplo199 koplo199 marked this pull request as draft July 13, 2023 21:42
@mirkobrombin
Copy link
Member

Let me know when this issue is ready for the review

@koplo199 koplo199 marked this pull request as ready for review July 14, 2023 15:51
@koplo199
Copy link
Contributor Author

@mirkobrombin I fixed the last remaining issues, it's ready for review

@TheEvilSkeleton TheEvilSkeleton added this to the 52.0 milestone Jul 29, 2023
@mirkobrombin mirkobrombin merged commit 65356d2 into bottlesdevs:main Aug 1, 2023
5 checks passed
@koplo199 koplo199 deleted the fix_offline_components branch September 26, 2023 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Old pre-release component versisons not shown
3 participants