AllYarnsAreBeautiful/AYABInterface

View on GitHub
AYABInterface/communication/states.py

Summary

Maintainability
C
1 day
Test Coverage

File states.py has 402 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""This module contains the state machine for the communication class.

Click on this image to go to the states from the diagram:

.. image:: ../../../_static/CommunicationStateDiagram.svg
Severity: Minor
Found in AYABInterface/communication/states.py - About 5 hrs to fix

    State has 27 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class State(object):
    
        """The base class for states."""
    
        def __init__(self, communication):
    Severity: Minor
    Found in AYABInterface/communication/states.py - About 3 hrs to fix

      TODO found
      Open

      # TODO: is it possible to know when the knitting process is over?
      Severity: Minor
      Found in AYABInterface/communication/states.py by fixme

      Expected 2 blank lines after class or function definition, found 1
      Open

      __all__ = ["State", "ConnectionClosed", "WaitingForStart",
      Severity: Minor
      Found in AYABInterface/communication/states.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