Function blocks
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def blocks(self, start=None, stop=None):
"""Yields blocks starting from ``start``.
:param int start: Starting block
:param int stop: Stop at this block
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_all_accounts
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get_all_accounts(self, start="", stop="", steps=1e3, **kwargs):
"""Yields account names between start and stop.
:param str start: Start at this account name
:param str stop: Stop at this account name
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function awaitTxConfirmation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def awaitTxConfirmation(self, transaction, limit=10):
"""Returns the transaction as seen by the blockchain after being
included into a block
.. note:: If you want instant confirmation, you need to instantiate
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function wait_for_and_get_block
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def wait_for_and_get_block(self, block_number, blocks_waiting_for=None):
"""Get the desired block from the chain, if the current head block is
smaller (for both head and irreversible) then we wait, but a
maxmimum of blocks_waiting_for * max_block_wait_repetition time
before failure.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ops
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ops(self, start=None, stop=None, **kwargs):
"""Yields all operations (excluding virtual operations) starting from
``start``.
:param int start: Starting block
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"