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

Initial mypy support #2747

Merged
merged 8 commits into from
Apr 30, 2023
Merged

Initial mypy support #2747

merged 8 commits into from
Apr 30, 2023

Conversation

qarmin
Copy link
Contributor

@qarmin qarmin commented Feb 26, 2023

Description

This PR adds initial mypy support.
I only fixed some occurrences of implictic-optional errors.

For now there is still a lot of disabled checks in mypy.ini, that needs to be enabled, but this should be done incrementally in several small PR's.

Fixes #2746

First CI run should fail because I commented disabled check in mypy.ini, to see if CI works properly

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 locally

Copy link
Contributor

@Kinsteen Kinsteen left a comment

Choose a reason for hiding this comment

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

I don't have any experience with MyPy, but it seems like it would be a great addition! However, it would be best if it could also use a generic version of utils/pylint-parser.py, so it could run only on modified files in a PR, instead of all the files, which would be pretty much unreadable. It would also be nice if there could be another action that could comment the PR with the results, like with Pylint again (maybe in the same comment, to avoid too many comments?)

.github/workflows/mypy.yml Outdated Show resolved Hide resolved
.github/workflows/mypy.yml Outdated Show resolved Hide resolved
@Kinsteen Kinsteen self-assigned this Feb 26, 2023
@qarmin
Copy link
Contributor Author

qarmin commented Feb 26, 2023

However, it would be best if it could also use a generic version of utils/pylint-parser.py, so it could run only on modified files in a PR, instead of all the files, which would be pretty much unreadable.

This is very bad idea,
Mypy greatest strength is to show type(and others) errors in files that were not directly changed e.g.
A.py file

from C import func

func("A", 1)

C.py file

def func(st: str, in: int):
    pass

Swapping arguments in C file will automatically show error in A file(if checking only the changed files was done, then basically there would be no point in using mypy)

so it could run only on modified files in a PR, instead of all the files, which would be pretty much unreadable

In the main branch, mypy should always detect 0 errors, so if in any PR it indicates more than 0 it means that the person who created it must correct them and no errors should be hidden from it(in my experience, I know that very rarely is the list of errors greater than 5/10)

@Kinsteen
Copy link
Contributor

I see, I was saying that it could only log for files that were modified, but run on the whole codebase. It will take a bit of time to fix all types errors, but it's interesting to have the log only on modified files in the PR, don't you think? That's what is currently done with Pylint for example, as otherwise the logs would be thousands of lines long

@StoneMoe
Copy link
Contributor

Great to see any progress about Code Quality improvement!
which is we are focusing in recent versions.

however there are two issues I found that need to be fix in this PR:

  1. Please use Optional[type] instead of type | None to match our codebase
  2. when a argument is likeparam: Type = None, it doesn't means you can simply change it to param: Optional[Type] = None, the default value None can be an indicator that the argument is not passed in, which doen't means caller can explicit pass a None in.

Also, is MyPy our only choice?
there are serveral type-aware static checkers out there, like Mypy, Pytype, Pyright, and Pyre.

@qarmin
Copy link
Contributor Author

qarmin commented Feb 27, 2023

when a argument is likeparam: Type = None, it doesn't means you can simply change it to param: Optional[Type] = None, the default value None can be an indicator that the argument is not passed in, which doen't means caller can explicit pass a None in.

For me this : Type = None looks counter intuitive, this is no longer the recommended behavior(by mypy) and also mypy converts this internally to : Optional[Type] = None. I don't see too big advantages of current behavior
https://github.com/python/peps/pull/689/files

@StoneMoe
Copy link
Contributor

when a argument is likeparam: Type = None, it doesn't means you can simply change it to param: Optional[Type] = None, the default value None can be an indicator that the argument is not passed in, which doen't means caller can explicit pass a None in.

For me this : Type = None looks counter intuitive, this is no longer the recommended behavior(by mypy) and also mypy converts this internally to : Optional[Type] = None. I don't see too big advantages of current behavior https://github.com/python/peps/pull/689/files

I think the sentence is no longer the recommended behavior is describing that Type checkers should move towards requiring the optional type to be made explicit instead of implicitly making an argument Optional.

I'm bad in English, correct me if I'm wrong.

@StoneMoe
Copy link
Contributor

StoneMoe commented Feb 27, 2023

For me this : Type = None looks counter intuitive

I'm agree with this to make everything less ambiguous tho.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 25, 2023

Pylint result on modfied files:
************* Module bottles.frontend.views.list
bottles/frontend/views/list.py:31:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/list.py:33:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/list.py:75:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/list.py:151:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/list.py:153:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/list.py:179:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/list.py:21:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/views/list.py:68:8: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/views/list.py:93:8: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/views/list.py:95:16: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/views/list.py:75:8: W0612: Unused variable 'activate_handler' (unused-variable)
bottles/frontend/views/list.py:102:4: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/views/list.py:104:21: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/list.py:111:4: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/views/list.py:140:27: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/list.py:186:39: W0613: Unused argument 'event' (unused-argument)
bottles/frontend/views/list.py:186:51: W0613: Unused argument 'data' (unused-argument)
bottles/frontend/views/list.py:221:12: W0612: Unused variable 'name' (unused-variable)
************* Module bottles.frontend.widgets.component
bottles/frontend/widgets/component.py:92: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:74:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/widgets/component.py:138: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:85:35: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/widgets/component.py:83:23: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/widgets/component.py:105:27: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/widgets/component.py:103:24: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/widgets/component.py:121:25: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/widgets/component.py:129: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:166:0: R0903: Too few public methods (0/2) (too-few-public-methods)
************* Module bottles.backend.state
bottles/backend/state.py:15:4: C0103: Class constant name "ComponentsInstall" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:19:4: C0103: Class constant name "ComponentsFetching" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:20:4: C0103: Class constant name "DependenciesFetching" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:21:4: C0103: Class constant name "InstallersFetching" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:22:4: C0103: Class constant name "ComponentsOrganizing" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:23:4: C0103: Class constant name "DependenciesOrganizing" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:24:4: C0103: Class constant name "InstallersOrganizing" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:29:4: C0103: Class constant name "ManagerLocalBottlesLoaded" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:31:4: C0103: Class constant name "RepositoryFetched" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:32:4: C0103: Class constant name "NetworkStatusChanged" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:34:4: C0103: Class constant name "GNotification" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:35:4: C0103: Class constant name "GShowUri" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:38:4: C0103: Class constant name "TaskAdded" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:39:4: C0103: Class constant name "TaskRemoved" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:40:4: C0103: Class constant name "TaskUpdated" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:49:0: R0903: Too few public methods (1/2) (too-few-public-methods)
bottles/backend/state.py:53:0: R0903: Too few public methods (1/2) (too-few-public-methods)
bottles/backend/state.py:125:16: C0103: Variable name "rv" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/state.py:210:12: C0103: Variable name "fn" doesn't conform to snake_case naming style (invalid-name)
************* Module bottles.backend.downloader
bottles/backend/downloader.py:52:27: W3101: Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (missing-timeout)
bottles/backend/downloader.py:33:0: R0903: Too few public methods (1/2) (too-few-public-methods)
************* Module bottles.backend.cabextract
bottles/backend/cabextract.py:110:15: W0718: Catching too general exception Exception (broad-exception-caught)
bottles/backend/cabextract.py:74:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/cabextract.py:89:20: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/cabextract.py:106:16: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/cabextract.py:30:0: R0903: Too few public methods (1/2) (too-few-public-methods)
************* Module bottles.backend.wine.winecommand
bottles/backend/wine/winecommand.py:257:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/wine/winecommand.py:264:80: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/wine/winecommand.py:643:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/wine/winecommand.py:264:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:477:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:477:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:577:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:577:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/winecommand.py:83:4: R0913: Too many arguments (11/5) (too-many-arguments)
bottles/backend/wine/winecommand.py:128:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:134:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:166:8: C0103: Variable name "ld" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:184:16: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:193:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:214:20: C0103: Variable name "ld" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:360:24: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:367:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:371:51: E1136: Value 'gpu['prime']['integrated']' is unsubscriptable (unsubscriptable-object)
bottles/backend/wine/winecommand.py:373:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:165:8: W0612: Unused variable 'is_nvidia' (unused-variable)
bottles/backend/wine/winecommand.py:418:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:428:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:436:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:477:32: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winecommand.py:486:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/winecommand.py:486:49: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:493:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/winecommand.py:493:49: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:497:16: C0103: Variable name "st" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:509:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:586:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winecommand.py:597:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winecommand.py:657:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:664:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/winecommand.py:604:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
bottles/backend/wine/winecommand.py:634:23: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winecommand.py:667:18: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winecommand.py:681:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/winecommand.py:681:41: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:685:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/winecommand.py:685:41: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winecommand.py:687:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/winecommand.py:687:41: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
************* Module bottles.backend.wine.executor
bottles/backend/wine/executor.py:69:0: W0311: Bad indentation. Found 16 spaces, expected 12 (bad-indentation)
bottles/backend/wine/executor.py:74:0: W0311: Bad indentation. Found 16 spaces, expected 12 (bad-indentation)
bottles/backend/wine/executor.py:79:0: W0311: Bad indentation. Found 16 spaces, expected 12 (bad-indentation)
bottles/backend/wine/executor.py:94:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/wine/executor.py:247:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/executor.py:24:4: R0913: Too many arguments (16/5) (too-many-arguments)
bottles/backend/wine/executor.py:141: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:199:8: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
bottles/backend/wine/executor.py:281:8: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
bottles/backend/wine/executor.py:296:8: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
bottles/backend/wine/executor.py:310:8: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
bottles/backend/wine/executor.py:324:8: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/executor.py:324:11: C0103: Variable name "h" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/executor.py:353:21: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
bottles/backend/wine/executor.py:356:12: C0103: Variable name "m" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/executor.py:4:0: W0611: Unused NewType imported from typing (unused-import)
bottles/backend/wine/executor.py:17:0: W0611: Unused WineBridge imported from bottles.backend.wine.winebridge (unused-import)
************* Module bottles.backend.wine.register
bottles/backend/wine/register.py:117:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/register.py:44:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/register.py:66:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/register.py:74:20: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/register.py:79:20: R1724: Unnecessary "elif" after "continue", remove the leading "el" from "elif" (no-else-continue)
bottles/backend/wine/register.py:80:24: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/register.py:92:24: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/register.py:122:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/wine/register.py:149:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/register.py:154:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/register.py:155:16: C0103: Variable name "h" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/register.py:158:12: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/wine/register.py:169:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
************* Module bottles.backend.wine.uninstaller
bottles/backend/wine/uninstaller.py:32:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/uninstaller.py:1:0: W0611: Unused NewType imported from typing (unused-import)
************* Module bottles.backend.wine.start
bottles/backend/wine/start.py:14:4: R0913: Too many arguments (6/5) (too-many-arguments)
bottles/backend/wine/start.py:1:0: W0611: Unused NewType imported from typing (unused-import)
************* Module bottles.backend.wine.reg
bottles/backend/wine/reg.py:125:9: W0511: TODO: temp fix because res is sometimes a string, sometimes bytes... (fixme)
bottles/backend/wine/reg.py:53:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/reg.py:55:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/wine/reg.py:53:45: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/reg.py:103:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/wine/reg.py:103:36: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/reg.py:124:8: W0612: Unused variable 'res' (unused-variable)
************* Module bottles.backend.wine.cmd
bottles/backend/wine/cmd.py:13:4: R0913: Too many arguments (6/5) (too-many-arguments)
bottles/backend/wine/cmd.py:1:0: W0611: Unused NewType imported from typing (unused-import)
************* Module bottles.backend.wine.notepad
bottles/backend/wine/notepad.py:26:0: C0305: Trailing newlines (trailing-newlines)
bottles/backend/wine/notepad.py:1:0: W0611: Unused NewType imported from typing (unused-import)
************* Module bottles.backend.wine.wineprogram
bottles/backend/wine/wineprogram.py:37:4: R0913: Too many arguments (8/5) (too-many-arguments)
************* Module bottles.backend.wine.regkeys
bottles/backend/wine/regkeys.py:57:12: C0103: Variable name "d" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/regkeys.py:60:20: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/regkeys.py:160:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/wine/regkeys.py:318:24: C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
bottles/backend/wine/regkeys.py:1:0: W0611: Unused NewType imported from typing (unused-import)
************* Module bottles.backend.wine.msiexec
bottles/backend/wine/msiexec.py:110:0: C0305: Trailing newlines (trailing-newlines)
bottles/backend/wine/msiexec.py:13:4: R0913: Too many arguments (6/5) (too-many-arguments)
bottles/backend/wine/msiexec.py:33:4: R0913: Too many arguments (13/5) (too-many-arguments)
bottles/backend/wine/msiexec.py:1:0: W0611: Unused NewType imported from typing (unused-import)
************* Module bottles.backend.wine.explorer
bottles/backend/wine/explorer.py:13:4: R0913: Too many arguments (8/5) (too-many-arguments)
bottles/backend/wine/explorer.py:1:0: W0611: Unused NewType imported from typing (unused-import)
************* Module bottles.backend.wine.xcopy
bottles/backend/wine/xcopy.py:14:4: R0913: Too many arguments (18/5) (too-many-arguments)
bottles/backend/wine/xcopy.py:1:0: W0611: Unused NewType imported from typing (unused-import)
************* Module bottles.backend.wine.net
bottles/backend/wine/net.py:48:12: C0103: Variable name "r" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/net.py:53:12: C0103: Variable name "r" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/net.py:1:0: W0611: Unused NewType imported from typing (unused-import)
************* Module bottles.backend.wine.winedbg
bottles/backend/wine/winedbg.py:45:12: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winedbg.py:46:12: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winedbg.py:49:16: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winedbg.py:50:16: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winedbg.py:52:12: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winedbg.py:65:16: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winedbg.py:122:16: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/wine/winedbg.py:89:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
bottles/backend/wine/winedbg.py:111:22: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/wine/winedbg.py:4:0: W0611: Unused NewType imported from typing (unused-import)
************* Module bottles.backend.dlls.nvapi
bottles/backend/dlls/nvapi.py:80:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/dlls/nvapi.py:54:37: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
************* Module bottles.backend.dlls.dll
bottles/backend/dlls/dll.py:164:61: W0511: TODO: should not be ok but just ignore it for now (fixme)
bottles/backend/dlls/dll.py:89:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/dlls/dll.py:89:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/dlls/dll.py:119:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/dlls/dll.py:119:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/dlls/dll.py:144:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/dlls/dll.py:58:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/dlls/dll.py:51: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:116:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/dlls/dll.py:166:16: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/dlls/dll.py:179:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/dlls/dll.py:143: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:20:0: W0611: Unused glob imported from glob (unused-import)
bottles/backend/dlls/dll.py:21:0: W0611: Unused NewType imported from typing (unused-import)
bottles/backend/dlls/dll.py:21:0: W0611: Unused Optional imported from typing (unused-import)
bottles/backend/dlls/dll.py:30:0: W0611: Unused WineBoot imported from bottles.backend.wine.wineboot (unused-import)
************* Module bottles.backend.utils.manager
bottles/backend/utils/manager.py:199:18: W0511: TODO: handle those (fixme)
bottles/backend/utils/manager.py:306:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:307:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:308:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:309:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:310:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:311:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:312:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:313:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:314:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:315:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:316:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:317:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:318:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:319:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:320:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:321:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:322:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:323:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:324:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:325:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:326:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:327:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:328:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:329:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:330:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:331:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:332:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:333:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:334:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:335:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:338:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:339:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:340:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:341:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:342:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:343:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:344:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:345:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:346:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:347:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:348:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:349:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:350:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:351:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:352:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:353:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:354:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:355:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:356:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:357:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:358:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:359:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:360:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:361:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:362:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:363:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:364:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:365:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:366:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:367:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/manager.py:130:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/utils/manager.py:161:12: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/manager.py:162:12: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/manager.py:168:8: C0415: Import outside toplevel (bottles.backend.wine.winepath.WinePath) (import-outside-toplevel)
bottles/backend/utils/manager.py:199:8: W0702: No exception type(s) specified (bare-except)
bottles/backend/utils/manager.py:193:16: C0103: Variable name "im" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/manager.py:242:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/utils/manager.py:242:44: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/manager.py:259:8: W0105: String statement has no effect (pointless-string-statement)
************* Module bottles.backend.utils.generic
bottles/backend/utils/generic.py:68:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/generic.py:81:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/generic.py:81:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/generic.py:63:4: W0702: No exception type(s) specified (bare-except)
bottles/backend/utils/generic.py:56:8: C0415: Import outside toplevel (ctypes) (import-outside-toplevel)
************* Module bottles.backend.utils.file
bottles/backend/utils/file.py:50:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:52:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:52:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:66:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:66:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:66:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:66:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:66:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:66:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:66:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:66:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:68:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:71:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:71:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:79:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:91:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/file.py:40:37: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/file.py:78:8: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
************* 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.manager
bottles/backend/managers/manager.py:1:0: C0302: Too many lines in module (1513/1000) (too-many-lines)
bottles/backend/managers/manager.py:403:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:761:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:1421:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:1421:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:149:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:149:19: C0103: Variable name "t" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:153:16: C0103: Variable name "t" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:161:8: C0103: Variable name "rv" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:166: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:169: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:172: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:175: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:178: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:181: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:184: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:362:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:366:22: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/managers/manager.py:371:31: C0207: Use version.split('\n', maxsplit=1)[0] instead (use-maxsplit-arg)
bottles/backend/managers/manager.py:391:12: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/managers/manager.py:391:16: C0103: Variable name "r" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:401:25: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
bottles/backend/managers/manager.py:405:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:450:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:450:40: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:477:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:477:44: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:545:25: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
bottles/backend/managers/manager.py:614:8: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:642:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:659:16: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/manager.py:732:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:732:48: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:793:16: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:806:16: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:815:16: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:816:16: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:839:12: C0103: Variable name "b" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:840:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:847:25: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
bottles/backend/managers/manager.py:856:4: R0913: Too many arguments (7/5) (too-many-arguments)
bottles/backend/managers/manager.py:881:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:918:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/managers/manager.py:919:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:931:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:939:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:944:16: R1721: Unnecessary use of a comprehension, use list(self.dxvk_available) instead. (unnecessary-comprehension)
bottles/backend/managers/manager.py:949:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:954:16: R1721: Unnecessary use of a comprehension, use list(self.vkd3d_available) instead. (unnecessary-comprehension)
bottles/backend/managers/manager.py:959:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:964:16: R1721: Unnecessary use of a comprehension, use list(self.nvapi_available) instead. (unnecessary-comprehension)
bottles/backend/managers/manager.py:972:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:990:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:996:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1002:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1009:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1012:29: C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
bottles/backend/managers/manager.py:1020:4: R0913: Too many arguments (14/5) (too-many-arguments)
bottles/backend/managers/manager.py:1122:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1139:8: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/manager.py:1151:12: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/manager.py:1148:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:1148:84: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:1188:8: C0103: Variable name "rk" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:1198:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1202:15: W0125: Using a conditional statement with a constant value (using-constant-test)
bottles/backend/managers/manager.py:1197:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:1197:8: R1702: Too many nested blocks (7/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:1197:8: R1702: Too many nested blocks (7/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:1282:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:1282:54: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:1435:8: W1510: 'subprocess.run' used without explicitly defining the value for 'check'. (subprocess-run-check)
bottles/backend/managers/manager.py:1474:4: R0913: Too many arguments (7/5) (too-many-arguments)
bottles/backend/managers/manager.py:76:0: R0904: Too many public methods (23/20) (too-many-public-methods)
************* Module bottles.backend.managers.installer
bottles/backend/managers/installer.py:408:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/installer.py:410:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/installer.py:410:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/installer.py:451:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/installer.py:102:16: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/installer.py:102:20: I1101: Module 'pycurl' has no 'Curl' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)
bottles/backend/managers/installer.py:104:38: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/managers/installer.py:149:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/installer.py:152:20: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/installer.py:163:12: C0103: Variable name "st" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/installer.py:250:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/managers/installer.py:229:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
bottles/backend/managers/installer.py:274:12: C0103: Variable name "d" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/installer.py:302:15: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/installer.py:346:4: R0913: Too many arguments (6/5) (too-many-arguments)
bottles/backend/managers/installer.py:433:16: C0103: Variable name "d" doesn't conform to snake_case naming style (invalid-name)
************* Module bottles.backend.managers.steam
bottles/backend/managers/steam.py:309:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens)
bottles/backend/managers/steam.py:310: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:97:54: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:124:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:124:66: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:157:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:157:67: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:174:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:174:49: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:188:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:188:39: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:312:16: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:387:12: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:389:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:390:16: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:403:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/managers/steam.py:403:12: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:405:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:407:20: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:426:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:427:16: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:432:12: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:432:15: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:468:12: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:468:15: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:541:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:546:69: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:549:20: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/steam.py:555:65: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
************* Module bottles.backend.managers.journal
bottles/backend/managers/journal.py:29:0: R0903: Too few public methods (0/2) (too-few-public-methods)
bottles/backend/managers/journal.py:51:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/journal.py:51:51: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/journal.py:54:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/journal.py:54:47: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/journal.py:66:22: R1721: Unnecessary use of a comprehension, use dict(sorted(journal.items(), key=lambda item: item[1]['timestamp'], reverse=True)) instead. (unnecessary-comprehension)
bottles/backend/managers/journal.py:101:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/journal.py:101:51: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
************* Module bottles.backend.managers.conf
bottles/backend/managers/conf.py:8:0: R0205: Class 'ConfigManager' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
bottles/backend/managers/conf.py:29:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/conf.py:29:48: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/conf.py:34:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/conf.py:39:22: W0212: Access to a protected member _sections of a client class (protected-access)
bottles/backend/managers/conf.py:41:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/conf.py:41:52: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/conf.py:43: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:44:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/conf.py:44:52: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/conf.py:52:22: W0212: Access to a protected member _sections of a client class (protected-access)
bottles/backend/managers/conf.py:55: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:70:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/conf.py:70:44: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/conf.py:75:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/conf.py:75:44: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/conf.py:88:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/conf.py:88:44: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/conf.py:92:8: R1720: Unnecessary "elif" after "raise", remove the leading "el" from "elif" (no-else-raise)
bottles/backend/managers/conf.py:97:8: W0105: String statement has no effect (pointless-string-statement)
************* Module bottles.backend.managers.sandbox
bottles/backend/managers/sandbox.py:27:4: R0913: Too many arguments (12/5) (too-many-arguments)

@Kinsteen
Copy link
Contributor

Hey! I'm taking this out of the grave, because I have time to work on this again. I've fixed conflicts and let the CI run, but it seems to have failed... Also, it seems that it want to cache something? How will the cache work between CI runs?

@qarmin
Copy link
Contributor Author

qarmin commented Apr 30, 2023

Probably fixed CI by installing manually all typing libraries.
Mypy takes 7s(<1s with cache) to scan project on my OS, so I don't think that would be big gain in adding cache to CI

@Kinsteen
Copy link
Contributor

Seems to have worked, but your update to requirements broke Pytest action. Can you fix it? Thanks!

Is it normal that we don't have any errors?

When all of it is done, I think we can merge! I'll maybe add a commenter so we can have a quick link to the report, but I'll do it later

@Kinsteen Kinsteen merged commit e9f168a into bottlesdevs:main Apr 30, 2023
4 checks passed
@qarmin qarmin deleted the mypy branch April 30, 2023 20:57
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.

Use mypy to check python code
3 participants