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: Various bug fixes and cleanups #3117

Merged
merged 4 commits into from
Dec 1, 2023

Conversation

koplo199
Copy link
Contributor

@koplo199 koplo199 commented Oct 4, 2023

Description

Various bug fixes and cleanups.

Non exhaustive list:

And probably more that I've forgotten...

bug_fixes_screenshot


It already required a lot of work and, unless it's an absolute necessity, I'm not keen to do much more modifications.

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?

Tested with local builds.

@fab-sonarqube
Copy link

fab-sonarqube bot commented Oct 4, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

Pylint result on modfied files:
************* Module bottles.frontend.cli.cli
bottles/frontend/cli/cli.py:31:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:31:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:76:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:76:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:79:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:79:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:79:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:82:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:82:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:82:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:98:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:98:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:98:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:98:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:98:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:98:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:98:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:99:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:103:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:103:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:103:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:103:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:109:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:109:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:109:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:109:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:138:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:138:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:651:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:34:0: C0103: Constant name "pkgdatadir" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/frontend/cli/cli.py:41:0: C0413: Import "from gi.repository import Gio" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:43:0: C0413: Import "from bottles.frontend.params import APP_ID" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:44:0: C0413: Import "from bottles.backend.globals import Paths" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:45:0: C0413: Import "from bottles.backend.health import HealthChecker" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:46:0: C0413: Import "from bottles.backend.managers.manager import Manager" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:47:0: C0413: Import "from bottles.backend.models.config import BottleConfig" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:48:0: C0413: Import "from bottles.backend.wine.cmd import CMD" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:49:0: C0413: Import "from bottles.backend.wine.control import Control" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:50:0: C0413: Import "from bottles.backend.wine.executor import WineExecutor" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:51:0: C0413: Import "from bottles.backend.wine.winecommand import WineCommand" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:52:0: C0413: Import "from bottles.backend.wine.reg import Reg" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:53:0: C0413: Import "from bottles.backend.wine.winepath import WinePath" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:54:0: C0413: Import "from bottles.backend.wine.regedit import Regedit" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:55:0: C0413: Import "from bottles.backend.wine.taskmgr import Taskmgr" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:56:0: C0413: Import "from bottles.backend.wine.uninstaller import Uninstaller" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:57:0: C0413: Import "from bottles.backend.wine.winecfg import WineCfg" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:58:0: C0413: Import "from bottles.backend.wine.explorer import Explorer" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:59:0: C0413: Import "from bottles.backend.wine.regkeys import RegKeys" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:60:0: C0413: Import "from bottles.backend.runner import Runner" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:61:0: C0413: Import "from bottles.backend.utils import json" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:62:0: C0413: Import "from bottles.backend.utils.manager import ManagerUtils" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:218:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:223:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:240:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:270:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:272:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/frontend/cli/cli.py:287:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:295:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:313:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:351:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:359:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:367:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:399:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:408:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:433:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:443:20: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:472:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:482:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:492:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:502:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:557:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:565:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:569:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:608:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:627:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:640:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/frontend/cli/cli.py:153:4: W0238: Unused private member `CLI.__clear()` (unused-private-member)
************* Module bottles.frontend.windows.envvars
bottles/frontend/windows/envvars.py:23:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/envvars.py:25:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/envvars.py:74:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/envvars.py:76:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/envvars.py:114:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/envvars.py:18:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/windows/envvars.py:24:0: R0903: Too few public methods (0/2) (too-few-public-methods)
bottles/frontend/windows/envvars.py:99:8: W0201: Attribute '__valid_name' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/envvars.py:109:12: W0201: Attribute '__valid_name' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/envvars.py:75:0: R0903: Too few public methods (0/2) (too-few-public-methods)
************* Module bottles.frontend.windows.launchoptions
bottles/frontend/windows/launchoptions.py:24:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/launchoptions.py:26:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/launchoptions.py:18:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/windows/launchoptions.py:171:31: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/launchoptions.py:171:39: W0613: Unused argument 'state' (unused-argument)
bottles/frontend/windows/launchoptions.py:178:50: W0613: Unused argument 'global_value' (unused-argument)
bottles/frontend/windows/launchoptions.py:185:4: R1711: Useless return at end of function or method (useless-return)
bottles/frontend/windows/launchoptions.py:25:0: R0903: Too few public methods (1/2) (too-few-public-methods)
bottles/frontend/windows/launchoptions.py:21:0: C0411: standard import "from gettext import gettext as _" should be placed before "from gi.repository import Gtk, GLib, GObject, Adw" (wrong-import-order)
************* Module bottles.frontend.windows.dlloverrides
bottles/frontend/windows/dlloverrides.py:22:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/dlloverrides.py:24:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/dlloverrides.py:50:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/dlloverrides.py:81:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/dlloverrides.py:83:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/dlloverrides.py:104:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/dlloverrides.py:18:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/windows/dlloverrides.py:23:0: R0903: Too few public methods (0/2) (too-few-public-methods)
bottles/frontend/windows/dlloverrides.py:120:8: W0201: Attribute '__valid_name' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/dlloverrides.py:82:0: R0903: Too few public methods (0/2) (too-few-public-methods)
************* Module bottles.backend.dlls.dll
bottles/backend/dlls/dll.py:166:61: W0511: TODO: should not be ok but just ignore it for now (fixme)
bottles/backend/dlls/dll.py:91:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/dlls/dll.py:91:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/dlls/dll.py:121:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/dlls/dll.py:121:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/dlls/dll.py:146:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/dlls/dll.py:60:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/dlls/dll.py:53:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
bottles/backend/dlls/dll.py:118:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/dlls/dll.py:168:16: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/dlls/dll.py:181:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/dlls/dll.py:145:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
************* Module bottles.backend.dlls.nvapi
bottles/backend/dlls/nvapi.py:85:0: C0303: Trailing whitespace (trailing-whitespace)
************* Module bottles.backend.wine.executor
bottles/backend/wine/executor.py:243:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/executor.py:26:4: R0913: Too many arguments (16/5) (too-many-arguments)
bottles/backend/wine/executor.py:133:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
bottles/backend/wine/executor.py:191:8: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
bottles/backend/wine/executor.py:289:8: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
bottles/backend/wine/executor.py:303:8: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
bottles/backend/wine/executor.py:346:21: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
************* Module bottles.backend.wine.winecommand
bottles/backend/wine/winecommand.py:702:0: C0305: Trailing newlines (trailing-newlines)
bottles/backend/wine/winecommand.py:265:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:475:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:475:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:588:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:588:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:86:4: W0102: Dangerous default value {} as argument (dangerous-default-value)
bottles/backend/wine/winecommand.py:86:4: R0913: Too many arguments (11/5) (too-many-arguments)
bottles/backend/wine/winecommand.py:131:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:137:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:365:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:369:51: E1136: Value 'gpu['prime']['integrated']' is unsubscriptable (unsubscriptable-object)
bottles/backend/wine/winecommand.py:371:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:173:8: W0612: Unused variable 'is_nvidia' (unused-variable)
bottles/backend/wine/winecommand.py:415:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:424:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:440:4: R0913: Too many arguments (6/5) (too-many-arguments)
bottles/backend/wine/winecommand.py:475:32: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winecommand.py:484:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/winecommand.py:491:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/winecommand.py:507:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:512:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:517:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:598:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winecommand.py:609:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winecommand.py:646:12: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
bottles/backend/wine/winecommand.py:663:23: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
************* Module bottles.backend.managers.manager
bottles/backend/managers/manager.py:117:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/managers/manager.py:120:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/managers/manager.py:136:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/managers/manager.py:1:0: C0302: Too many lines in module (1569/1000) (too-many-lines)
bottles/backend/managers/manager.py:412:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:743: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:1477:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:1477:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:175: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:178: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:181: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:184: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:187: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:190: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:193: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:371:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:375:22: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/managers/manager.py:380:31: C0207: Use version.split('\n', maxsplit=1)[0] instead (use-maxsplit-arg)
bottles/backend/managers/manager.py:400:12: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/managers/manager.py:410:25: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
bottles/backend/managers/manager.py:414:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:460:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:487:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:606:25: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
bottles/backend/managers/manager.py:611:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:684:8: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:712:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:729: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:855:16: W0105: String statement has no effect (pointless-string-statement)
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:1069:74: E1101: Instance of 'list' has no 'get' member (no-member)
bottles/backend/managers/manager.py:1075:4: R0913: Too many arguments (14/5) (too-many-arguments)
bottles/backend/managers/manager.py:1177:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1194:8: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/manager.py:1206:12: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/manager.py:1203:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:1253:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1257:15: W0125: Using a conditional statement with a constant value (using-constant-test)
bottles/backend/managers/manager.py:1252:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:1252:8: R1702: Too many nested blocks (7/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:1252:8: R1702: Too many nested blocks (7/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:1337:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:1491:8: W1510: 'subprocess.run' used without explicitly defining the value for 'check'. (subprocess-run-check)
bottles/backend/managers/manager.py:1530: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.managers.ubisoftconnect
bottles/backend/managers/ubisoftconnect.py:114:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/ubisoftconnect.py:77:50: C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
bottles/backend/managers/ubisoftconnect.py:112:30: C0207: Use _path.rsplit('\\', maxsplit=1)[-1] instead (use-maxsplit-arg)
bottles/backend/managers/ubisoftconnect.py:106:16: W0612: Unused variable 'k' (unused-variable)
************* Module bottles.backend.managers.steam
bottles/backend/managers/steam.py:308:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens)
bottles/backend/managers/steam.py:309:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens)
bottles/backend/managers/steam.py:97:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:124:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:157:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:174:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:188:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:382:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/managers/steam.py:528:20: W0702: No exception type(s) specified (bare-except)
************* Module bottles.backend.managers.epicgamesstore
bottles/backend/managers/epicgamesstore.py:63:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/epicgamesstore.py:72:30: C0207: Use _path.rsplit('\\', maxsplit=1)[-1] instead (use-maxsplit-arg)
************* Module bottles.backend.utils.steam
bottles/backend/utils/steam.py:136:0: C0304: Final newline missing (missing-final-newline)
bottles/backend/utils/steam.py:18:0: C0410: Multiple imports on one line (os, subprocess, shlex) (multiple-imports)
bottles/backend/utils/steam.py:20:0: W0404: Reimport 'TextIO' (imported line 19) (reimported)
bottles/backend/utils/steam.py:60:12: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/utils/steam.py:60:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/utils/steam.py:81:12: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/utils/steam.py:81:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/utils/steam.py:18:0: W0611: Unused import subprocess (unused-import)
bottles/backend/utils/steam.py:19:0: W0611: Unused Union imported from typing (unused-import)
************* Module bottles.backend.utils.terminal
bottles/backend/utils/terminal.py:34:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:34:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:35:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:35:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:36:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:36:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:62:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:68:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:71:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:73:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:79:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:84:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:88:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:95:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:96:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:100:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:102:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:104:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:112:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:118:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:120:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:121:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/terminal.py:67:29: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/utils/terminal.py:106:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

Copy link
Member

@mirkobrombin mirkobrombin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for your big contribution!

@orowith2os
Copy link
Contributor

I think the linter's code smell hints are reasonable here. Let's fix up some of those before merging.

@koplo199
Copy link
Contributor Author

Done 👌

@koplo199 koplo199 mentioned this pull request Nov 30, 2023
Copy link

fab-sonarqube bot commented Dec 1, 2023

@mirkobrombin mirkobrombin merged commit f9c19ae into bottlesdevs:main Dec 1, 2023
6 checks passed
@IPlayZed
Copy link

IPlayZed commented Dec 9, 2023

@mirkobrombin which release version will this be available on Flathub? Cheers!

@mirkobrombin
Copy link
Member

@mirkobrombin which release version will this be available on Flathub? Cheers!

51.10

@koplo199 koplo199 deleted the bug_fixes_and_cleanups branch March 26, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment