Konano/arknights-mower

View on GitHub
arknights_mower/utils/asst.py

Summary

Maintainability
A
1 hr
Test Coverage

Function __set_lib_properties has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def __set_lib_properties():
        Asst.__lib.AsstSetUserDir.restype = ctypes.c_bool
        Asst.__lib.AsstSetUserDir.argtypes = (
            ctypes.c_char_p,)

Severity: Minor
Found in arknights_mower/utils/asst.py - About 1 hr to fix

    No newline at end of file
    Open

        SubTaskStopped = auto()
    Severity: Minor
    Found in arknights_mower/utils/asst.py by pep8

    Trailing blank lines are superfluous.

    Okay: spam(1)
    W391: spam(1)\n
    
    However the last line should end with a new line (warning W292).

    Too many blank lines (2)
    Open

        def connect(self, adb_path: str, address: str, config: str = 'General'):
    Severity: Minor
    Found in arknights_mower/utils/asst.py by pep8

    Separate top-level function and class definitions with two blank lines.

    Method definitions inside a class are separated by a single blank
    line.
    
    Extra blank lines may be used (sparingly) to separate groups of
    related functions.  Blank lines may be omitted between a bunch of
    related one-liners (e.g. a set of dummy implementations).
    
    Use blank lines in functions, sparingly, to indicate logical
    sections.
    
    Okay: def a():\n    pass\n\n\ndef b():\n    pass
    Okay: def a():\n    pass\n\n\nasync def b():\n    pass
    Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
    Okay: default = 1\nfoo = 1
    Okay: classify = 1\nfoo = 1
    
    E301: class Foo:\n    b = 0\n    def bar():\n        pass
    E302: def a():\n    pass\n\ndef b(n):\n    pass
    E302: def a():\n    pass\n\nasync def b(n):\n    pass
    E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
    E303: def a():\n\n\n\n    pass
    E304: @decorator\n\ndef a():\n    pass
    E305: def a():\n    pass\na()
    E306: def a():\n    def b():\n        pass\n    def c():\n        pass

    There are no issues that match your filters.

    Category
    Status