Konano/arknights-mower

View on GitHub
arknights_mower/strategy.py

Summary

Maintainability
A
0 mins
Test Coverage

Function ope has 6 arguments (exceeds 4 allowed). Consider refactoring.
Wontfix

    def ope(self, level: str = None, times: int = -1, potion: int = 0, originite: int = 0, eliminate: int = 0, plan: list[tp.OpePlan] = None) -> list[tp.OpePlan]:
Severity: Minor
Found in arknights_mower/strategy.py - About 45 mins to fix

    Too many blank lines (2)
    Open

        def base_scheduler (self,tasks=[],plan={},current_base={},)-> None:
    Severity: Minor
    Found in arknights_mower/strategy.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

    Whitespace before '('
    Open

        def base_scheduler (self,tasks=[],plan={},current_base={},)-> None:
    Severity: Minor
    Found in arknights_mower/strategy.py by pep8

    Avoid extraneous whitespace.

    Avoid extraneous whitespace in the following situations:
    - before the open parenthesis that starts the argument list of a
      function call.
    - before the open parenthesis that starts an indexing or slicing.
    
    Okay: spam(1)
    E211: spam (1)
    
    Okay: dict['key'] = list[index]
    E211: dict ['key'] = list[index]
    E211: dict['key'] = list [index]

    Missing whitespace after ','
    Open

        def base_scheduler (self,tasks=[],plan={},current_base={},)-> None:
    Severity: Minor
    Found in arknights_mower/strategy.py by pep8

    Each comma, semicolon or colon should be followed by whitespace.

    Okay: [a, b]
    Okay: (3,)
    Okay: a[1:4]
    Okay: a[:4]
    Okay: a[1:]
    Okay: a[1:4:2]
    E231: ['a','b']
    E231: foo(bar,baz)
    E231: [{'a':'b'}]

    Missing whitespace after ','
    Open

        def base_scheduler (self,tasks=[],plan={},current_base={},)-> None:
    Severity: Minor
    Found in arknights_mower/strategy.py by pep8

    Each comma, semicolon or colon should be followed by whitespace.

    Okay: [a, b]
    Okay: (3,)
    Okay: a[1:4]
    Okay: a[:4]
    Okay: a[1:]
    Okay: a[1:4:2]
    E231: ['a','b']
    E231: foo(bar,baz)
    E231: [{'a':'b'}]

    Missing whitespace around operator
    Open

        def base_scheduler (self,tasks=[],plan={},current_base={},)-> None:
    Severity: Minor
    Found in arknights_mower/strategy.py by pep8

    Surround operators with a single space on either side.

    - Always surround these binary operators with a single space on
      either side: assignment (=), augmented assignment (+=, -= etc.),
      comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
      Booleans (and, or, not).
    
    - If operators with different priorities are used, consider adding
      whitespace around the operators with the lowest priorities.
    
    Okay: i = i + 1
    Okay: submitted += 1
    Okay: x = x * 2 - 1
    Okay: hypot2 = x * x + y * y
    Okay: c = (a + b) * (a - b)
    Okay: foo(bar, key='word', *args, **kwargs)
    Okay: alpha[:-i]
    
    E225: i=i+1
    E225: submitted +=1
    E225: x = x /2 - 1
    E225: z = x **y
    E225: z = 1and 1
    E226: c = (a+b) * (a-b)
    E226: hypot2 = x*x + y*y
    E227: c = a|b
    E228: msg = fmt%(errno, errmsg)

    Missing whitespace after ','
    Open

            return BaseSchedulerSolver(self.device, self.recog).run(tasks,plan,current_base)
    Severity: Minor
    Found in arknights_mower/strategy.py by pep8

    Each comma, semicolon or colon should be followed by whitespace.

    Okay: [a, b]
    Okay: (3,)
    Okay: a[1:4]
    Okay: a[:4]
    Okay: a[1:]
    Okay: a[1:4:2]
    E231: ['a','b']
    E231: foo(bar,baz)
    E231: [{'a':'b'}]

    Missing whitespace after ','
    Open

        def base_scheduler (self,tasks=[],plan={},current_base={},)-> None:
    Severity: Minor
    Found in arknights_mower/strategy.py by pep8

    Each comma, semicolon or colon should be followed by whitespace.

    Okay: [a, b]
    Okay: (3,)
    Okay: a[1:4]
    Okay: a[:4]
    Okay: a[1:]
    Okay: a[1:4:2]
    E231: ['a','b']
    E231: foo(bar,baz)
    E231: [{'a':'b'}]

    Missing whitespace after ','
    Open

            return BaseSchedulerSolver(self.device, self.recog).run(tasks,plan,current_base)
    Severity: Minor
    Found in arknights_mower/strategy.py by pep8

    Each comma, semicolon or colon should be followed by whitespace.

    Okay: [a, b]
    Okay: (3,)
    Okay: a[1:4]
    Okay: a[:4]
    Okay: a[1:]
    Okay: a[1:4:2]
    E231: ['a','b']
    E231: foo(bar,baz)
    E231: [{'a':'b'}]

    There are no issues that match your filters.

    Category
    Status