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

make BottleConfig Json serializable #2710

Merged
merged 4 commits into from
Feb 23, 2023

Conversation

StoneMoe
Copy link
Contributor

@StoneMoe StoneMoe commented Feb 21, 2023

Description

Fix bug reported by Slowpokefarm@Discord

(1)(deck@steamdeck ~)$ flatpak run --command=bottles-cli com.usebottles.bottles -j list bottles

(process:2): Gtk-WARNING **: 13:46:18.764: Locale not supported by C library.
        Using the fallback 'C' locale.
Traceback (most recent call last):
  File "/app/bin/bottles-cli", line 657, in <module>
    cli = CLI()
  File "/app/bin/bottles-cli", line 151, in __init__
    self.__process_args()
  File "/app/bin/bottles-cli", line 170, in __process_args
    self.list_bottles(c_filter=_filter)
  File "/app/bin/bottles-cli", line 237, in list_bottles
    sys.stdout.write(json.dumps(bottles))
  File "/usr/lib/python3.10/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type BottleConfig is not JSON serializable

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 locally with a success flatpak run --command=bottles-cli com.usebottles.bottles -j list bottles

@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 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:78:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:78:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:81:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:81:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:81:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:84:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:84:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:84:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:100:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:100:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:100:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:100:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:100:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:100:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:100:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:101:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:105:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:105:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:105:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:105:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:111:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:111:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:111:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:111:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:140:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:140:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:657:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/cli/cli.py:32:0: C0413: Import "from gi.repository import Gtk, Gio" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:35:0: C0103: Constant name "pkgdatadir" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/frontend/cli/cli.py:42:0: W0401: Wildcard import bottles.frontend.params (wildcard-import)
bottles/frontend/cli/cli.py:42:0: C0413: Import "from bottles.frontend.params import *" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:43: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:44: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:45: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:46: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:47: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:48: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:49: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:50: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:51: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:52: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:53: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:54: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:55: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:56: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:57: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:58: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:59: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:60: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:61: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:62:0: C0413: Import "from bottles.frontend.utils.connection import ConnectionUtils" should be placed at the top of the module (wrong-import-position)
bottles/frontend/cli/cli.py:217:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:219:12: C0103: Variable name "hc" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/cli/cli.py:222:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:239:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:243:16: C0103: Variable name "b" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/cli/cli.py:269:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:271:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/frontend/cli/cli.py:271:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/cli/cli.py:286:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:294:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:298:16: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/cli/cli.py:312:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:350:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:358:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:366:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:398:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:407:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:432:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:439:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/cli/cli.py:442:20: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:445:20: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/cli/cli.py:447:20: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/cli/cli.py:450:24: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/cli/cli.py:457:15: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/cli/cli.py:471:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:481:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:491:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:501:16: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:551: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:616:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:633:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/cli/cli.py:646:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/frontend/cli/cli.py:646:43: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/cli/cli.py:648:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/cli/cli.py:155:4: W0238: Unused private member `CLI.__clear()` (unused-private-member)
bottles/frontend/cli/cli.py:42:0: W0614: Unused import(s) APP_NAME, APP_NAME_LOWER, APP_ICON, BUILD_TYPE, ANIM_DURATION, EXECUTABLE_EXTS and DOC_URL from wildcard import of bottles.frontend.params (unused-wildcard-import)
************* Module bottles.frontend.windows.crash
bottles/frontend/windows/crash.py:48:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/crash.py:50:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/crash.py:71:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/crash.py:23:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/windows/crash.py:34:8: E1101: Instance of 'Button' has no 'add_css_class' member (no-member)
bottles/frontend/windows/crash.py:40:32: W0613: Unused argument 'button' (unused-argument)
bottles/frontend/windows/crash.py:28:0: R0903: Too few public methods (0/2) (too-few-public-methods)
bottles/frontend/windows/crash.py:66:11: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck)
bottles/frontend/windows/crash.py:76:12: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/windows/crash.py:88:12: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/windows/crash.py:144:52: C0103: Variable name "r" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/windows/crash.py:148:16: C0103: Variable name "d" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/windows/crash.py:155:4: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/windows/crash.py:157:28: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/crash.py:157:36: W0613: Unused argument 'log' (unused-argument)
bottles/frontend/windows/crash.py:49:0: R0903: Too few public methods (0/2) (too-few-public-methods)
************* Module bottles.backend.utils.json
bottles/backend/utils/json.py:3:0: W0404: Reimport 'json' (imported line 2) (reimported)
bottles/backend/utils/json.py:18:9: C0103: Argument name "fp" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/json.py:23:10: C0103: Argument name "s" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/json.py:29:18: C0103: Argument name "fp" doesn't conform to snake_case naming style (invalid-name)
************* Module bottles.backend.utils.yaml
bottles/backend/utils/yaml.py:1:0: E0401: Unable to import 'yaml' (import-error)
bottles/backend/utils/yaml.py:26:17: C0103: Argument name "Loader" doesn't conform to snake_case naming style (invalid-name)
************* Module bottles.backend.wine.register
bottles/backend/wine/register.py:116:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/register.py:43:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/register.py:65:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/register.py:73:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/register.py:78:20: R1724: Unnecessary "elif" after "continue", remove the leading "el" from "elif" (no-else-continue)
bottles/backend/wine/register.py:79:24: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/register.py:91:24: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/register.py:121:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/wine/register.py:148:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/register.py:153:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/register.py:154:16: C0103: Variable name "h" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/register.py:157:12: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/wine/register.py:168:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
************* Module bottles.backend.models.config
bottles/backend/models/config.py:63:5: W0511: share_host_ro: bool = True  # TODO: implement, requires the Bottles runtime (next) for a minimal sandbox (fixme)
bottles/backend/models/config.py:64:5: W0511: share_gpu: bool = True  # TODO: implement (fixme)
bottles/backend/models/config.py:65:5: W0511: share_paths_ro: List[str] = field(default_factory=lambda: [])  # TODO: implement (fixme)
bottles/backend/models/config.py:66:5: W0511: share_paths_rw: List[str] = field(default_factory=lambda: [])  # TODO: implement (fixme)
bottles/backend/models/config.py:233:9: W0511: TODO: remove after some time (fixme)
bottles/backend/models/config.py:151:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/models/config.py:172:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/models/config.py:172:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/models/config.py:203:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/models/config.py:118:4: C0103: Attribute name "Name" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:119:4: C0103: Attribute name "Arch" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:120:4: C0103: Attribute name "Windows" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:121:4: C0103: Attribute name "Runner" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:122:4: C0103: Attribute name "WorkingDir" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:123:4: C0103: Attribute name "DXVK" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:124:4: C0103: Attribute name "NVAPI" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:125:4: C0103: Attribute name "VKD3D" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:126:4: C0103: Attribute name "LatencyFleX" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:127:4: C0103: Attribute name "Path" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:128:4: C0103: Attribute name "Custom_Path" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:129:4: C0103: Attribute name "Environment" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:130:4: C0103: Attribute name "Creation_Date" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:131:4: C0103: Attribute name "Update_Date" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:132:4: C0103: Attribute name "Versioning" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:133:4: C0103: Attribute name "Versioning_Exclusion_Patterns" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:134:4: C0103: Attribute name "State" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:135:4: C0103: Attribute name "Parameters" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:136:4: C0103: Attribute name "Sandbox" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:137:4: C0103: Attribute name "Environment_Variables" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:138:4: C0103: Attribute name "Installed_Dependencies" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:139:4: C0103: Attribute name "DLL_Overrides" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:140:4: C0103: Attribute name "External_Programs" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:141:4: C0103: Attribute name "Uninstallers" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:144:4: C0103: Attribute name "Language" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:147:4: C0103: Attribute name "CompatData" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:149:4: C0103: Attribute name "RunnerPath" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:161:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:161:50: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/models/config.py:161:50: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/models/config.py:165:15: W0718: Catching too general exception Exception (broad-exception-caught)
bottles/backend/models/config.py:165:8: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:180:8: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:196:15: W0718: Catching too general exception Exception (broad-exception-caught)
bottles/backend/models/config.py:185:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:185:54: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/models/config.py:185:54: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/models/config.py:196:8: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:200:18: C0321: More than one statement on a single line (multiple-statements)
bottles/backend/models/config.py:217:15: W0718: Catching too general exception Exception (broad-exception-caught)
bottles/backend/models/config.py:217:8: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:262:15: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/models/config.py:266:20: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
************* 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.managers.conf
bottles/backend/managers/conf.py:7:0: R0205: Class 'ConfigManager' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
bottles/backend/managers/conf.py:28:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/conf.py:28:48: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/conf.py:33:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/conf.py:38:22: W0212: Access to a protected member _sections of a client class (protected-access)
bottles/backend/managers/conf.py:40:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/conf.py:40:52: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/conf.py:42:17: R1714: Consider merging these comparisons with 'in' by using 'self.config_type in ('yaml', 'yml')'. Use a set instead if elements are hashable. (consider-using-in)
bottles/backend/managers/conf.py:43:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/conf.py:43:52: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/conf.py:51:22: W0212: Access to a protected member _sections of a client class (protected-access)
bottles/backend/managers/conf.py:54:17: R1714: Consider merging these comparisons with 'in' by using 'self.config_type in ('yaml', 'yml')'. Use a set instead if elements are hashable. (consider-using-in)
bottles/backend/managers/conf.py:69:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/conf.py:69:44: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/conf.py:74:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/conf.py:74:44: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/conf.py:87:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/conf.py:87:44: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/conf.py:91:8: R1720: Unnecessary "elif" after "raise", remove the leading "el" from "elif" (no-else-raise)
bottles/backend/managers/conf.py:96:8: W0105: String statement has no effect (pointless-string-statement)
************* 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:71:61: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/ubisoftconnect.py:72:16: C0103: Variable name "r" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/ubisoftconnect.py:73:16: C0103: Variable name "r" doesn't conform to snake_case naming style (invalid-name)
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:106:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
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.origin
bottles/backend/managers/origin.py:51:28: W0613: Unused argument 'config' (unused-argument)

@StoneMoe StoneMoe marked this pull request as ready for review February 21, 2023 13:05
@Kinsteen Kinsteen merged commit 3fa8382 into bottlesdevs:main Feb 23, 2023
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.

None yet

2 participants