AYABInterface/communication/states.py
File states.py
has 402 lines of code (exceeds 250 allowed). Consider refactoring. Open
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
State
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class State(object):
"""The base class for states."""
def __init__(self, communication):
TODO found Open
Open
# TODO: is it possible to know when the knitting process is over?
- Exclude checks
Expected 2 blank lines after class or function definition, found 1 Open
Open
__all__ = ["State", "ConnectionClosed", "WaitingForStart",
- Read upRead up
- Exclude checks
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