holgern/beem

View on GitHub
beem/cli.py

Summary

Maintainability
F
4 mos
Test Coverage
F
56%

File cli.py has 4836 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
import os
import ast
import json
import sys
Severity: Major
Found in beem/cli.py - About 2 wks to fix

    Function info has a Cognitive Complexity of 131 (exceeds 5 allowed). Consider refactoring.
    Open

    def info(objects):
        """ Show basic blockchain info
    
            General information about the blockchain, a block, an account,
            a post/comment and a public key
    Severity: Minor
    Found in beem/cli.py - About 2 days to fix

    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 pending has a Cognitive Complexity of 121 (exceeds 5 allowed). Consider refactoring.
    Open

    def pending(accounts, only_sum, post, comment, curation, length, author, permlink, title, days, _from):
        """ Lists pending rewards
        """
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
    Severity: Minor
    Found in beem/cli.py - About 2 days to fix

    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 curation has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
    Open

    def curation(authorperm, account, limit, min_vote, max_vote, min_performance, max_performance, payout, export, short, length, permlink, title, days):
        """ Lists curation rewards of all votes for authorperm
    
            When authorperm is empty or "all", the curation rewards
            for all account votes are shown.
    Severity: Minor
    Found in beem/cli.py - About 2 days to fix

    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 rewards has a Cognitive Complexity of 107 (exceeds 5 allowed). Consider refactoring.
    Open

    def rewards(accounts, only_sum, post, comment, curation, length, author, permlink, title, days):
        """ Lists received rewards
        """
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
    Severity: Minor
    Found in beem/cli.py - About 2 days to fix

    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 post has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring.
    Open

    def post(markdown_file, account, title, permlink, tags, reply_identifier, community, canonical_url, beneficiaries, percent_steem_dollars, percent_hbd, max_accepted_payout, no_parse_body, no_patch_on_edit, export):
        """broadcasts a post/comment. All image links which links to a file will be uploaded.
        The yaml header can contain:
    
        ---
    Severity: Minor
    Found in beem/cli.py - About 1 day to fix

    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

    Cyclomatic complexity is too high in function post. (75)
    Open

    @cli.command()
    @click.argument('markdown-file', nargs=1)
    @click.option('--account', '-a', help='Account are you posting from')
    @click.option('--title', '-t', help='Title of the post')
    @click.option('--permlink', '-p', help='Manually set the permlink (optional)')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function curation. (68)
    Open

    @cli.command()
    @click.argument('authorperm', nargs=1, required=False)
    @click.option('--account', '-a', help='Show only curation for this account')
    @click.option('--limit', '-m', help='Show only the first minutes')
    @click.option('--min-vote', '-v', help='Show only votes higher than the given value')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function pending. (67)
    Open

    @cli.command()
    @click.argument('accounts', nargs=-1, required=False)
    @click.option('--only-sum', '-s', help='Show only the sum', is_flag=True, default=False)
    @click.option('--post', '-p', help='Show pending post payout', is_flag=True, default=False)
    @click.option('--comment', '-c', help='Show pending comments payout', is_flag=True, default=False)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function keygen has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
    Open

    def keygen(import_word_list, strength, passphrase, path, network, role, account_keys, sequence, account, wif, export_pub, export):
        """ Creates a new random BIP39 key and prints its derived private key and public key.
            The generated key is not stored. Can also be used to create new keys for an account.
            Can also be used to derive account keys from a password or BIP39 wordlist.
        """
    Severity: Minor
    Found in beem/cli.py - About 1 day to fix

    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 download has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
    Open

    def download(permlink, account, save, export):
        """Download body with yaml header"""
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
            stm.rpc.rpcconnect()
    Severity: Minor
    Found in beem/cli.py - About 1 day to fix

    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

    Cyclomatic complexity is too high in function rewards. (61)
    Open

    @cli.command()
    @click.argument('accounts', nargs=-1, required=False)
    @click.option('--only-sum', '-s', help='Show only the sum', is_flag=True, default=False)
    @click.option('--post', '-p', help='Show post payout', is_flag=True, default=False)
    @click.option('--comment', '-c', help='Show comments payout', is_flag=True, default=False)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function info. (55)
    Open

    @cli.command()
    @click.argument('objects', nargs=-1)
    def info(objects):
        """ Show basic blockchain info
    
    
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function unlock_wallet has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
    Open

    def unlock_wallet(stm, password=None, allow_wif=True):
        if stm.unsigned and stm.nobroadcast:
            return True
        if stm.use_ledger:
            return True
    Severity: Minor
    Found in beem/cli.py - About 1 day to fix

    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

    Cyclomatic complexity is too high in function download. (40)
    Open

    @cli.command()
    @click.argument('permlink', nargs=-1)
    @click.option('--account', '-a', help='Account are you posting from')
    @click.option('--save', '-s', help="Saves markdown in current directoy as date_permlink.md", is_flag=True, default=False)
    @click.option('--export', '-e', default=None, help="Export markdown to given a md-file name")
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function decrypt has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
    Open

    def decrypt(memo, account, output, info, text, binary):
        """decrypt a (or more than one) decrypted memo/file with your memo key
    
        """
        if text and binary:
    Severity: Minor
    Found in beem/cli.py - About 6 hrs to fix

    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 draw has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
    Open

    def draw(block, trx_id, draws, participants, hashtype, separator, account, reply, without_replacement, markdown):
        """ Generate pseudo-random numbers based on trx id, block id and previous block id.
    
        When using --reply, the result is directly broadcasted as comment
        """
    Severity: Minor
    Found in beem/cli.py - About 6 hrs to fix

    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 createpost has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

    def createpost(markdown_file, account, title, tags, community, beneficiaries, percent_steem_dollars, percent_hbd, max_accepted_payout, no_parse_body):
        """Creates a new markdown file with YAML header"""
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
            stm.rpc.rpcconnect()
    Severity: Minor
    Found in beem/cli.py - About 6 hrs to fix

    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 verify has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
    Open

    def verify(blocknumber, trx, use_api):
        """Returns the public signing keys for a block"""
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
            stm.rpc.rpcconnect()
    Severity: Minor
    Found in beem/cli.py - About 6 hrs to fix

    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

    Cyclomatic complexity is too high in function draw. (32)
    Open

    @cli.command()
    @click.option('--block', '-b', help='Select a block number, when skipped the latest block is used.', default=None)
    @click.option('--trx-id', '-t', help='Select a trx-id, When skipped, the latest one is used.', default=None)
    @click.option('--draws', '-d', help='Number of draws (default = 1)', default=1)
    @click.option('--participants', '-p', help='Number of participants or file name including participants (one participant per line), (default = 100)', default="100")
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function orderbook has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
    Open

    def orderbook(chart, limit, show_date, width, height, ascii):
        """Obtain orderbook of the internal market"""
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
            stm.rpc.rpcconnect()
    Severity: Minor
    Found in beem/cli.py - About 6 hrs to fix

    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

    Cyclomatic complexity is too high in function keygen. (31)
    Open

    @cli.command()
    @click.option('--import-word-list', '-l', help='Imports a BIP39 wordlist and derives a private and public key', is_flag=True, default=False)
    @click.option('--strength', help='Defines word list length for BIP39 (default = 256).', default=256)
    @click.option('--passphrase', '-p', help='Sets a BIP39 passphrase', is_flag=True, default=False)
    @click.option('--path', '-m', help='Sets a path for BIP39 key creations. When path is set, network, role, account_keys, account and sequence is not used')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function history has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

    def history(account, limit, sort, max_length, virtual_ops, only_ops, exclude_ops, json_file):
        """ Returns account history operations as table
    
        """
        stm = shared_blockchain_instance()
    Severity: Minor
    Found in beem/cli.py - About 5 hrs to fix

    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

    Cyclomatic complexity is too high in function createpost. (30)
    Open

    @cli.command()
    @click.argument('markdown-file', nargs=1)
    @click.option('--account', '-a', help='Account are you posting from')
    @click.option('--title', '-t', help='Title of the post')
    @click.option('--tags', '-g', help='A komma separated list of tags to go with the post.')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function witnessfeed. (30)
    Open

    @cli.command()
    @click.argument('witness', nargs=1)
    @click.argument('wif', nargs=1, required=False)
    @click.option('--base', '-b', help='Set base manually, when not set the base is automatically calculated.')
    @click.option('--quote', '-q', help='Steem quote manually, when not set the base is automatically calculated.')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function notifications. (29)
    Open

    @cli.command()
    @click.argument('account', nargs=1, required=False)
    @click.option('--limit', '-l', help='Limits shown notifications')
    @click.option('--all', '-a', help='Show all notifications (when not set, only unread are shown)', is_flag=True, default=False)
    @click.option('--mark_as_read', '-m', help='Broadcast a mark all as read custom json', is_flag=True, default=False)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function orderbook. (27)
    Open

    @cli.command()
    @click.option('--chart', help='Enable charting', is_flag=True)
    @click.option('--limit', '-l', help='Limit number of returned open orders (default 25)', default=25)
    @click.option('--show-date', help='Show dates', is_flag=True, default=False)
    @click.option('--width', '-w', help='Plot width (default 75)', default=75)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function decrypt. (26)
    Open

    @cli.command()
    @click.argument('memo', nargs=-1)
    @click.option('--account', '-a', help='Account which decrypts the memo with its memo key')
    @click.option('--output', '-o', help='Output file name. Result is stored, when set instead of printed.')
    @click.option('--info', '-i', help='Shows information about public keys and used nonce', is_flag=True, default=False)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function unlock_wallet. (26)
    Open

    def unlock_wallet(stm, password=None, allow_wif=True):
        if stm.unsigned and stm.nobroadcast:
            return True
        if stm.use_ledger:
            return True
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function history. (26)
    Open

    @cli.command()
    @click.argument('account', nargs=1, required=False)
    @click.option('--limit', '-l', help='Defines how many ops should be printed (default=10)', default=10)
    @click.option('--sort', '-s', help='Defines the printing sorting, 1 ->, -1 <- (default=-1)', default=-1)
    @click.option('--max-length', '-m', help='Maximum printed string length', default=80)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function stream has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

    def stream(lines, head, table, follow):
        """ Stream operations
        """
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
    Severity: Minor
    Found in beem/cli.py - About 5 hrs to fix

    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

    Cyclomatic complexity is too high in function set. (25)
    Open

    @cli.command()
    @click.argument('key')
    @click.argument('value')
    def set(key, value):
        """ Set default_account, default_vote_weight or nodes
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function witnessfeed has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

    def witnessfeed(witness, wif, base, quote, support_peg):
        """Publish price feed for a witness"""
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
            stm.rpc.rpcconnect()
    Severity: Minor
    Found in beem/cli.py - About 4 hrs to fix

    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

    Cyclomatic complexity is too high in function changekeys. (23)
    Open

    @cli.command()
    @click.argument('account', nargs=1, required=True)
    @click.option('--owner', help='Main owner public key - when not given, a passphrase is used to create keys.')
    @click.option('--active', help='Active public key - when not given, a passphrase is used to create keys.')
    @click.option('--posting', help='posting public key - when not given, a passphrase is used to create keys.')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function set has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
    Open

    def set(key, value):
        """ Set default_account, default_vote_weight or nodes
    
            set [key] [value]
    
    
    Severity: Minor
    Found in beem/cli.py - About 4 hrs to fix

    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

    Cyclomatic complexity is too high in function cli. (21)
    Open

    @shell(prompt='beempy> ', intro='Starting beempy... (use help to list all commands)', chain=True)
    # @click.group(chain=True)
    @click.option(
        '--node', '-n', default="", help="URL for public Hive API (e.g. https://api.hive.blog)")
    @click.option(
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function verify. (21)
    Open

    @cli.command()
    @click.argument('blocknumber', nargs=1, required=False)
    @click.option('--trx', '-t', help='Show only one transaction number', default=None)
    @click.option('--use-api', '-u', help='Uses the get_potential_signatures api call', is_flag=True, default=False)
    def verify(blocknumber, trx, use_api):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function passwordgen. (21)
    Open

    @cli.command()
    @click.option('--role', '-r', help='Defines which key role should be created. When owner is not set as role and an cold card wif is imported, the Master Password is not shown. (default = owner,active,posting,memo when creating account keys).', default="owner,active,posting,memo")
    @click.option('--account', '-a', help='account name for password based key generation')
    @click.option('--import-password', '-i', help='Imports a password and derives all four account keys', is_flag=True, default=False)
    @click.option('--import-coldcard', '-o', help='Text file with a BIP85 WIF generated by a coldcard. The imported WIF is used to derives all four account keys')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function newaccount. (20)
    Open

    @cli.command()
    @click.argument('accountname', nargs=1, required=True)
    @click.option('--account', '-a', help='Account that pays the fee or uses account tickets')
    @click.option('--owner', help='Main public owner key - when not given, a passphrase is used to create keys.')
    @click.option('--active', help='Active public key - when not given, a passphrase is used to create keys.')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function stream. (20)
    Open

    @cli.command()
    @click.option('--lines', '-n', help='Defines how many ops should be shown', default=10)
    @click.option('--head', '-h', help='Stream mode: When set, it is set to head (default is irreversible)', is_flag=True, default=False)
    @click.option('--table', '-t', help='Output as table', is_flag=True, default=False)
    @click.option('--follow', '-f', help='Constantly stream output', is_flag=True, default=False)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function updatenodes. (20)
    Open

    @cli.command()
    @click.option(
        '--show', '-s', is_flag=True, default=False,
        help="Prints the updated nodes")
    @click.option(
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function encrypt has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

    def encrypt(receiver, memo, account, output, text, binary):
        """encrypt a (or more than one) memo text/file with the your memo key
    
        """
        if text and binary:
    Severity: Minor
    Found in beem/cli.py - About 4 hrs to fix

    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

    Cyclomatic complexity is too high in function unlock_token_wallet. (19)
    Open

    def unlock_token_wallet(stm, sc2, password=None):
        if stm.unsigned and stm.nobroadcast:
            return True
        if stm.use_ledger:
            return True
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function encrypt. (19)
    Open

    @cli.command()
    @click.argument('receiver', nargs=1)
    @click.argument('memo', nargs=-1)
    @click.option('--account', '-a', help='Account which encrypts the memo with its memo key')
    @click.option('--output', '-o', help='Output file name. Result is stored, when set instead of printed.')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function importaccount. (19)
    Open

    @cli.command()
    @click.argument('account', nargs=1, required=True)
    @click.option('--roles', '-r', help='Import specified keys (owner, active, posting, memo).', default=["active", "posting", "memo"])
    @click.option('--import-coldcard', '-i', help='Text file with a BIP85 WIF generated by a coldcard. The imported WIF is used as passphrase')
    @click.option('--wif', '-w', help='Defines how many times the password is replaced by its WIF representation for password based keys (default = 0 or 1 when importing a cold card wif).')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function cli has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
    Open

    def cli(node, offline, no_broadcast, no_wallet, unsigned, create_link, steem, hive, keys, use_ledger, path, token, expires, verbose):
    
        # Logging
        log = logging.getLogger(__name__)
        verbosity = ["critical", "error", "warn", "info", "debug"][int(
    Severity: Minor
    Found in beem/cli.py - About 3 hrs to fix

    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 updatenodes has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

    def updatenodes(show, hive, steem, blurt, test, only_https, only_wss):
        """ Update the nodelist from @fullnodeupdate
        """
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
    Severity: Minor
    Found in beem/cli.py - About 3 hrs to fix

    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

    Cyclomatic complexity is too high in function claimreward. (17)
    Open

    @cli.command()
    @click.argument('account', nargs=1, required=False)
    @click.option('--reward_steem', help='Amount of STEEM/HIVE you would like to claim', default=0)
    @click.option('--reward_sbd', help='Amount of SBD/HBD you would like to claim', default=0)
    @click.option('--reward_vests', help='Amount of VESTS you would like to claim', default=0)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function unlock_token_wallet has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

    def unlock_token_wallet(stm, sc2, password=None):
        if stm.unsigned and stm.nobroadcast:
            return True
        if stm.use_ledger:
            return True
    Severity: Minor
    Found in beem/cli.py - About 3 hrs to fix

    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

    Cyclomatic complexity is too high in function witnessupdate. (16)
    Open

    @cli.command()
    @click.option('--witness', help='Witness name')
    @click.option('--maximum_block_size', help='Max block size')
    @click.option('--account_creation_fee', help='Account creation fee')
    @click.option('--sbd_interest_rate', help='SBD interest rate in percent')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function witnessproperties. (16)
    Open

    @cli.command()
    @click.argument('witness', nargs=1)
    @click.argument('wif', nargs=1)
    @click.option('--account_creation_fee', help='Account creation fee (float)')
    @click.option('--account_subsidy_budget', help='Account subisidy per block')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function claimaccount. (16)
    Open

    @cli.command()
    @click.argument('creator', nargs=1, required=True)
    @click.option('--fee', help='When fee is 0 (default) a subsidized account is claimed and can be created later with create_claimed_account', default=0.0)
    @click.option('--number', '-n', help='Number of subsidized accounts to be claimed (default = 1), when fee = 0 STEEM', default=1)
    @click.option('--export', '-e', help='When set, transaction is stored in a file (should be used with number = 1)')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function buy. (16)
    Open

    @cli.command()
    @click.argument('amount', nargs=1)
    @click.argument('asset', nargs=1)
    @click.argument('price', nargs=1, required=False)
    @click.option('--account', '-a', help='Buy with this account (defaults to "default_account")')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function setprofile. (15)
    Open

    @cli.command()
    @click.argument('variable', nargs=1, required=False)
    @click.argument('value', nargs=1, required=False)
    @click.option('--account', '-a', help='setprofile as this user')
    @click.option('--pair', '-p', help='"Key=Value" pairs', multiple=True)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function sell. (15)
    Open

    @cli.command()
    @click.argument('amount', nargs=1)
    @click.argument('asset', nargs=1)
    @click.argument('price', nargs=1, required=False)
    @click.option('--account', '-a', help='Sell with this account (defaults to "default_account")')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function delegate. (15)
    Open

    @cli.command()
    @click.argument('amount', nargs=1)
    @click.argument('to_account', nargs=1)
    @click.option('--account', '-a', help='Delegate from this account')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function beneficiaries. (15)
    Open

    @cli.command()
    @click.argument('authorperm', nargs=1)
    @click.argument('beneficiaries', nargs=-1)
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def beneficiaries(authorperm, beneficiaries, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function notifications has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

    def notifications(account, limit, all, mark_as_read, replies, mentions, follows, votes, reblogs, reverse):
        """ Show notifications of an account
        """
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
    Severity: Minor
    Found in beem/cli.py - About 3 hrs to fix

    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

    Cyclomatic complexity is too high in function upvote. (14)
    Open

    @cli.command()
    @click.argument('post', nargs=1)
    @click.option('--weight', '-w', help='Vote weight (from 0.1 to 100.0)')
    @click.option('--account', '-a', help='Voter account name')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function witness. (14)
    Open

    @cli.command()
    @click.argument('witness', nargs=1)
    def witness(witness):
        """ List witness information
        """
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function importaccount has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

    def importaccount(account, roles, import_coldcard, wif):
        """Import an account using a passphrase"""
        from beemgraphenebase.account import PasswordKey
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
    Severity: Minor
    Found in beem/cli.py - About 3 hrs to fix

    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

    Cyclomatic complexity is too high in function disallow. (13)
    Open

    @cli.command()
    @click.argument('foreign_account', nargs=1, required=False)
    @click.option('--permission', '-p', default="posting", help='The permission to grant (defaults to "posting")')
    @click.option('--account', '-a', help='The account to disallow action for')
    @click.option('--threshold', '-t', help='The permission\'s threshold that needs to be reached '
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function allow. (13)
    Open

    @cli.command()
    @click.argument('foreign_account', nargs=1, required=False)
    @click.option('--permission', default="posting", help='The permission to grant (defaults to "posting")')
    @click.option('--account', '-a', help='The account to allow action for')
    @click.option('--weight', '-w', help='The weight to use instead of the (full) threshold. '
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function downvote. (13)
    Open

    @cli.command()
    @click.argument('post', nargs=1)
    @click.option('--account', '-a', help='Downvoter account name')
    @click.option('--weight', '-w', default=100, help='Downvote weight (from 0.1 to 100.0)')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function votes. (13)
    Open

    @cli.command()
    @click.argument('account', nargs=1, required=False)
    @click.option('--direction', default=None, help="in or out")
    @click.option('--outgoing', '-o', help='Show outgoing votes', is_flag=True, default=False)
    @click.option('--incoming', '-i', help='Show incoming votes', is_flag=True, default=False)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function newaccount has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

    def newaccount(accountname, account, owner, active, memo, posting, wif, create_claimed_account, import_pub, export):
        """Create a new account
           Default setting is that a fee is payed for account creation
           Use --create-claimed-account for free account creation
    
    
    Severity: Minor
    Found in beem/cli.py - About 2 hrs to fix

    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 passwordgen has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

    def passwordgen(role, account, import_password, import_coldcard, wif, export_pub, export):
        """ Creates a new password based key and prints its derived private key and public key.
            The generated key is not stored. The password is used to create new keys for an account.
        """
        stm = shared_blockchain_instance()
    Severity: Minor
    Found in beem/cli.py - About 2 hrs to fix

    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 listaccounts has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

    def listaccounts(role, max_account_index, max_sequence):
        """Show stored accounts
    
        Can be used with the ledger to obtain all accounts that uses pubkeys derived from this ledger
        """
    Severity: Minor
    Found in beem/cli.py - About 2 hrs to fix

    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

    Cyclomatic complexity is too high in function sign. (12)
    Open

    @cli.command()
    @click.option('--file', '-i', help='Load transaction from file. If "-", read from stdin (defaults to "-")')
    @click.option('--outfile', '-o', help='Load transaction from file. If "-", read from stdin (defaults to "-")')
    def sign(file, outfile):
        """Sign a provided transaction with available and required keys"""
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function updatememokey. (12)
    Open

    @cli.command()
    @click.option('--account', '-a', help='The account to updatememokey action for')
    @click.option('--key', help='The new memo key')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def updatememokey(account, key, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function listaccounts. (12)
    Open

    @cli.command()
    @click.option('--role', '-r', help='When set, limits the shown keys for this role')
    @click.option('--max-account-index', '-a', help='Set maximum account index to check pubkeys (only when using ledger)', default=5)
    @click.option('--max-sequence', '-s', help='Set maximum key sequence to check pubkeys (only when using ledger)', default=2)
    def listaccounts(role, max_account_index, max_sequence):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function witness has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    def witness(witness):
        """ List witness information
        """
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
    Severity: Minor
    Found in beem/cli.py - About 2 hrs to fix

    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

    Cyclomatic complexity is too high in function witnesscreate. (11)
    Open

    @cli.command()
    @click.argument('witness', nargs=1)
    @click.argument('pub_signing_key', nargs=1)
    @click.option('--maximum_block_size', help='Max block size', default=65536)
    @click.option('--account_creation_fee', help='Account creation fee', default=0.1)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function delete. (11)
    Open

    @cli.command()
    @click.argument('post', nargs=1)
    @click.option('--account', '-a', help='Account name')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def delete(post, account, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function transfer. (11)
    Open

    @cli.command()
    @click.argument('to', nargs=1)
    @click.argument('amount', nargs=1)
    @click.argument('asset', nargs=1, callback=asset_callback)
    @click.argument('memo', nargs=1, required=False)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function nextnode. (11)
    Open

    @cli.command()
    @click.option('--results', is_flag=True, default=False, help="Shows result of changing the node.")
    def nextnode(results):
        """ Uses the next node in list
        """
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function powerdown. (11)
    Open

    @cli.command()
    @click.argument('amount', nargs=1)
    @click.option('--account', '-a', help='Powerup from this account')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def powerdown(amount, account, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function witnessdisable. (11)
    Open

    @cli.command()
    @click.argument('witness', nargs=1)
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def witnessdisable(witness, export):
        """Disable a witness"""
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function convert. (11)
    Open

    @cli.command()
    @click.argument('amount', nargs=1)
    @click.option('--account', '-a', help='Powerup from this account')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def convert(amount, account, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function delprofile. (11)
    Open

    @cli.command()
    @click.argument('variable', nargs=-1, required=True)
    @click.option('--account', '-a', help='delprofile as this user')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def delprofile(variable, account, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function mute. (11)
    Open

    @cli.command()
    @click.argument('mute', nargs=1)
    @click.option('--account', '-a', help='Mute from this account')
    @click.option('--what', help='Mute these objects (defaults to ["ignore"])', default=["ignore"])
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function powerup. (11)
    Open

    @cli.command()
    @click.argument('amount', nargs=1)
    @click.option('--account', '-a', help='Powerup from this account')
    @click.option('--to', '-t', help='Powerup this account', default=None)
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function reply. (11)
    Open

    @cli.command()
    @click.argument('authorperm', nargs=1)
    @click.argument('body', nargs=1)
    @click.option('--account', '-a', help='Account are you posting from')
    @click.option('--title', '-t', help='Title of the post')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function follow. (11)
    Open

    @cli.command()
    @click.argument('follow', nargs=-1)
    @click.option('--account', '-a', help='Follow from this account')
    @click.option('--what', help='Follow these objects (defaults to ["blog"])', default=["blog"])
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function message. (11)
    Open

    @cli.command()
    @click.argument('message_file', nargs=1, required=False)
    @click.option('--account', '-a', help='Account which should sign')
    @click.option('--verify', '-v', help='Verify a message instead of signing it', is_flag=True, default=False)
    def message(message_file, account, verify):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function ticker. (10)
    Open

    @cli.command()
    @click.option('--sbd-to-steem', help='Show ticker in SBD/STEEM', is_flag=True, default=False)
    @click.option('--hbd-to-hive', '-i', help='Show ticker in HBD/HIVE', is_flag=True, default=False)
    def ticker(sbd_to_steem, hbd_to_hive):
        """ Show ticker
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function cancel. (10)
    Open

    @cli.command()
    @click.argument('orderid', nargs=1)
    @click.option('--account', '-a', help='Sell with this account (defaults to "default_account")')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def cancel(orderid, account, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function parsewif. (10)
    Open

    @cli.command()
    @click.option('--unsafe-import-key',
                  help='WIF key to parse (unsafe, unless shell history is deleted afterwards)', multiple=True)
    def parsewif(unsafe_import_key):
        """ Parse a WIF private key without importing
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function disapprovewitness. (10)
    Open

    @cli.command()
    @click.argument('witness', nargs=1)
    @click.option('--account', '-a', help='Your account')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def disapprovewitness(witness, account, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function delproxy. (10)
    Open

    @cli.command()
    @click.option('--account', '-a', help='Your account')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def delproxy(account, export):
        """Delete your witness/proposal system proxy"""
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function unfollow. (10)
    Open

    @cli.command()
    @click.argument('unfollow', nargs=1)
    @click.option('--account', '-a', help='UnFollow/UnMute from this account')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def unfollow(unfollow, account, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function changerecovery. (10)
    Open

    @cli.command()
    @click.argument('new_recovery_account', nargs=1)
    @click.option('--account', '-a', help='Change the recovery account from this account')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def changerecovery(new_recovery_account, account, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function approvewitness. (10)
    Open

    @cli.command()
    @click.argument('witness', nargs=1)
    @click.option('--account', '-a', help='Your account')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def approvewitness(witness, account, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function currentnode. (10)
    Open

    @cli.command()
    @click.option(
        '--version', is_flag=True, default=False,
        help="Returns only the raw version value")
    @click.option(
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function createwallet. (10)
    Open

    @cli.command()
    @click.option('--wipe', is_flag=True, default=False,
                  help="Wipe old wallet without prompt.")
    def createwallet(wipe):
        """ Create new wallet with a new password
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function setproxy. (10)
    Open

    @cli.command()
    @click.argument('proxy', nargs=1)
    @click.option('--account', '-a', help='Your account')
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def setproxy(proxy, account, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function powerdownroute. (10)
    Open

    @cli.command()
    @click.argument('to', nargs=1)
    @click.option('--percentage', default=100, help='The percent of the withdraw to go to the "to" account')
    @click.option('--account', '-a', help='Powerup from this account')
    @click.option('--auto_vest', help='Set to true if the from account should receive the VESTS as'
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function reblog. (10)
    Open

    @cli.command()
    @click.argument('identifier', nargs=1)
    @click.option('--account', '-a', help='Reblog as this user')
    def reblog(identifier, account):
        """Reblog an existing post"""
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function witnessenable. (10)
    Open

    @cli.command()
    @click.argument('witness', nargs=1)
    @click.argument('signing_key', nargs=1)
    @click.option('--export', '-e', help='When set, transaction is stored in a file')
    def witnessenable(witness, signing_key, export):
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Cyclomatic complexity is too high in function tradehistory. (9)
    Open

    @cli.command()
    @click.option('--days', '-d', help='Limit the days of shown trade history (default 7)', default=7.)
    @click.option('--hours', help='Limit the intervall history intervall (default 2 hours)', default=2.0)
    @click.option('--sbd-to-steem', help='Show ticker in SBD/STEEM', is_flag=True, default=False)
    @click.option('--hbd-to-hive', '-i', help='Show ticker in HBD/HIVE', is_flag=True, default=False)
    Severity: Minor
    Found in beem/cli.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function parsewif has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

    def parsewif(unsafe_import_key):
        """ Parse a WIF private key without importing
        """
        stm = shared_blockchain_instance()
        if stm.rpc is not None:
    Severity: Minor
    Found in beem/cli.py - About 2 hrs to fix

    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 post has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def post(markdown_file, account, title, permlink, tags, reply_identifier, community, canonical_url, beneficiaries, percent_steem_dollars, percent_hbd, max_accepted_payout, no_parse_body, no_patch_on_edit, export):
        """broadcasts a post/comment. All image links which links to a file will be uploaded.
        The yaml header can contain:
    
        ---
    Severity: Major
    Found in beem/cli.py - About 2 hrs to fix

      Cyclomatic complexity is too high in function listdelegations. (8)
      Open

      @cli.command()
      @click.option('--account', '-a', help="List outgoing delegations from this account")
      def listdelegations(account):
          """ List all outgoing delegations from an account.
      
      
      Severity: Minor
      Found in beem/cli.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Cyclomatic complexity is too high in function customjson. (8)
      Open

      @cli.command()
      @click.argument('jsonid', nargs=1)
      @click.argument('json_data', nargs=-1)
      @click.option('--account', '-a', help='The account which broadcasts the custom_json')
      @click.option('--active', '-t', help='When set, the active key is used for broadcasting', is_flag=True, default=False)
      Severity: Minor
      Found in beem/cli.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Cyclomatic complexity is too high in function config. (8)
      Open

      @cli.command()
      def config():
          """ Shows local configuration
          """
          stm = shared_blockchain_instance()
      Severity: Minor
      Found in beem/cli.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Cyclomatic complexity is too high in function walletinfo. (8)
      Open

      @cli.command()
      @click.option('--unlock', '-u', is_flag=True, default=False, help='Unlock wallet')
      @click.option('--lock', '-l', is_flag=True, default=False, help='Lock wallet')
      def walletinfo(unlock, lock):
          """ Show info about wallet
      Severity: Minor
      Found in beem/cli.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Cyclomatic complexity is too high in function broadcast. (8)
      Open

      @cli.command()
      @click.option('--file', '-f', help='Load transaction from file. If "-", read from stdin (defaults to "-")')
      def broadcast(file):
          """broadcast a signed transaction"""
          stm = shared_blockchain_instance()
      Severity: Minor
      Found in beem/cli.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Function claimaccount has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

      def claimaccount(creator, fee, number, export):
          """Claim account for claimed account creation."""
          stm = shared_blockchain_instance()
          if stm.rpc is not None:
              stm.rpc.rpcconnect()
      Severity: Minor
      Found in beem/cli.py - About 2 hrs to fix

      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

      Cyclomatic complexity is too high in function userdata. (7)
      Open

      @cli.command()
      @click.argument('account', nargs=1, required=False)
      @click.option('--signing-account', '-s', help='Signing account, when empty account is used.')
      def userdata(account, signing_account):
          """ Get the account's email address and phone number.
      Severity: Minor
      Found in beem/cli.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Cyclomatic complexity is too high in function changewalletpassphrase. (7)
      Open

      @cli.command()
      def changewalletpassphrase():
          """ Change wallet password
          """
          stm = shared_blockchain_instance()
      Severity: Minor
      Found in beem/cli.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Cyclomatic complexity is too high in function permissions. (7)
      Open

      @cli.command()
      @click.argument('account', nargs=1, required=False)
      def permissions(account):
          """ Show permissions of an account
          """
      Severity: Minor
      Found in beem/cli.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Cyclomatic complexity is too high in function featureflags. (7)
      Open

      @cli.command()
      @click.argument('account', nargs=1, required=False)
      @click.option('--signing-account', '-s', help='Signing account, when empty account is used.')
      def featureflags(account, signing_account):
          """ Get the account's feature flags.
      Severity: Minor
      Found in beem/cli.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Function buy has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

      def buy(amount, asset, price, account, orderid, export):
          """Buy STEEM/HIVE or SBD/HBD from the internal market
      
              Limit buy price denoted in (SBD per STEEM or HBD per HIVE)
          """
      Severity: Minor
      Found in beem/cli.py - About 1 hr to fix

      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 sell has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

      def sell(amount, asset, price, account, orderid, export):
          """Sell STEEM/HIVE or SBD/HBD from the internal market
      
              Limit sell price denoted in (SBD per STEEM) or (HBD per HIVE)
          """
      Severity: Minor
      Found in beem/cli.py - About 1 hr to fix

      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 message has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

      def message(message_file, account, verify):
          """Sign and verify a message
      
          """
          stm = shared_blockchain_instance()
      Severity: Minor
      Found in beem/cli.py - About 1 hr to fix

      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 post has 15 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def post(markdown_file, account, title, permlink, tags, reply_identifier, community, canonical_url, beneficiaries, percent_steem_dollars, percent_hbd, max_accepted_payout, no_parse_body, no_patch_on_edit, export):
      Severity: Major
      Found in beem/cli.py - About 1 hr to fix

        Cyclomatic complexity is too high in function followlist. (6)
        Open

        @cli.command()
        @click.argument('follow-type')
        @click.option('--account', '-a', help='Get follow list for this account')
        @click.option('--limit', '-l', help='Liimts the returned accounts', default=100)
        def followlist(follow_type, account, limit):
        Severity: Minor
        Found in beem/cli.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in function listkeys. (6)
        Open

        @cli.command()
        @click.option('--path', '-p', help='Set path (when using ledger)')
        @click.option('--ledger-approval', '-a', is_flag=True, default=False, help='When set, you can confirm the shown pubkey on your ledger.')
        def listkeys(path, ledger_approval):
            """ Show stored keys
        Severity: Minor
        Found in beem/cli.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Function curation has 14 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def curation(authorperm, account, limit, min_vote, max_vote, min_performance, max_performance, payout, export, short, length, permlink, title, days):
        Severity: Major
        Found in beem/cli.py - About 1 hr to fix

          Function cli has 14 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def cli(node, offline, no_broadcast, no_wallet, unsigned, create_link, steem, hive, keys, use_ledger, path, token, expires, verbose):
          Severity: Major
          Found in beem/cli.py - About 1 hr to fix

            Function draw has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            def draw(block, trx_id, draws, participants, hashtype, separator, account, reply, without_replacement, markdown):
                """ Generate pseudo-random numbers based on trx id, block id and previous block id.
            
                When using --reply, the result is directly broadcasted as comment
                """
            Severity: Minor
            Found in beem/cli.py - About 1 hr to fix

              Function changekeys has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
              Open

              def changekeys(account, owner, active, posting, memo, import_pub, export):
                  """Changes all keys for the specified account
                  Keys are given in their public form.
                  Asks for the owner key for broadcasting the op to the chain."""
                  stm = shared_blockchain_instance()
              Severity: Minor
              Found in beem/cli.py - About 1 hr to fix

              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 keygen has 12 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def keygen(import_word_list, strength, passphrase, path, network, role, account_keys, sequence, account, wif, export_pub, export):
              Severity: Major
              Found in beem/cli.py - About 1 hr to fix

                Function upvote has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                def upvote(post, account, weight, export):
                    """Upvote a post/comment
                
                        POST is @author/permlink
                    """
                Severity: Minor
                Found in beem/cli.py - About 1 hr to fix

                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 beneficiaries has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                def beneficiaries(authorperm, beneficiaries, export):
                    """Set beneficaries"""
                    stm = shared_blockchain_instance()
                    if stm.rpc is not None:
                        stm.rpc.rpcconnect()
                Severity: Minor
                Found in beem/cli.py - About 1 hr to fix

                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 pending has 11 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def pending(accounts, only_sum, post, comment, curation, length, author, permlink, title, days, _from):
                Severity: Major
                Found in beem/cli.py - About 1 hr to fix

                  Function ticker has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def ticker(sbd_to_steem, hbd_to_hive):
                      """ Show ticker
                      """
                      stm = shared_blockchain_instance()
                      if stm.rpc is not None:
                  Severity: Minor
                  Found in beem/cli.py - About 1 hr to fix

                  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 votes has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def votes(account, direction, outgoing, incoming, days, export):
                      """ List outgoing/incoming account votes
                      """
                      stm = shared_blockchain_instance()
                      if stm.rpc is not None:
                  Severity: Minor
                  Found in beem/cli.py - About 1 hr to fix

                  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 rewards has 10 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def rewards(accounts, only_sum, post, comment, curation, length, author, permlink, title, days):
                  Severity: Major
                  Found in beem/cli.py - About 1 hr to fix

                    Function witnessproperties has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def witnessproperties(witness, wif, account_creation_fee, account_subsidy_budget, account_subsidy_decay, maximum_block_size, sbd_interest_rate, hbd_interest_rate, new_signing_key, url):
                        """Update witness properties of witness WITNESS with the witness signing key WIF"""
                        stm = shared_blockchain_instance()
                        if stm.rpc is not None:
                            stm.rpc.rpcconnect()
                    Severity: Minor
                    Found in beem/cli.py - About 1 hr to fix

                    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 newaccount has 10 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def newaccount(accountname, account, owner, active, memo, posting, wif, create_claimed_account, import_pub, export):
                    Severity: Major
                    Found in beem/cli.py - About 1 hr to fix

                      Function nextnode has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def nextnode(results):
                          """ Uses the next node in list
                          """
                          stm = shared_blockchain_instance()
                          if stm.rpc is not None:
                      Severity: Minor
                      Found in beem/cli.py - About 1 hr to fix

                      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 tradehistory has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def tradehistory(days, hours, sbd_to_steem, hbd_to_hive, limit, width, height, ascii):
                          """ Show price history
                          """
                          stm = shared_blockchain_instance()
                          if stm.rpc is not None:
                      Severity: Minor
                      Found in beem/cli.py - About 1 hr to fix

                      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 draw has 10 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def draw(block, trx_id, draws, participants, hashtype, separator, account, reply, without_replacement, markdown):
                      Severity: Major
                      Found in beem/cli.py - About 1 hr to fix

                        Function claimreward has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def claimreward(account, reward_steem, reward_sbd, reward_vests, claim_all_steem, claim_all_sbd, claim_all_vests, export):
                            """Claim reward balances
                        
                                By default, this will claim ``all`` outstanding balances.
                            """
                        Severity: Minor
                        Found in beem/cli.py - About 1 hr to fix

                        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 witnessupdate has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def witnessupdate(witness, maximum_block_size, account_creation_fee, sbd_interest_rate, hbd_interest_rate, url, signing_key, export):
                            """Change witness properties"""
                            stm = shared_blockchain_instance()
                            if stm.rpc is not None:
                                stm.rpc.rpcconnect()
                        Severity: Minor
                        Found in beem/cli.py - About 1 hr to fix

                        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 notifications has 10 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def notifications(account, limit, all, mark_as_read, replies, mentions, follows, votes, reblogs, reverse):
                        Severity: Major
                        Found in beem/cli.py - About 1 hr to fix

                          Function walletinfo has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def walletinfo(unlock, lock):
                              """ Show info about wallet
                              """
                              stm = shared_blockchain_instance()
                              if stm.rpc is not None:
                          Severity: Minor
                          Found in beem/cli.py - About 1 hr to fix

                          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 createpost has 10 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def createpost(markdown_file, account, title, tags, community, beneficiaries, percent_steem_dollars, percent_hbd, max_accepted_payout, no_parse_body):
                          Severity: Major
                          Found in beem/cli.py - About 1 hr to fix

                            Function witnessproperties has 10 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def witnessproperties(witness, wif, account_creation_fee, account_subsidy_budget, account_subsidy_decay, maximum_block_size, sbd_interest_rate, hbd_interest_rate, new_signing_key, url):
                            Severity: Major
                            Found in beem/cli.py - About 1 hr to fix

                              Function setprofile has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def setprofile(variable, value, account, pair, export):
                                  """Set a variable in an account\'s profile"""
                                  stm = shared_blockchain_instance()
                                  if stm.rpc is not None:
                                      stm.rpc.rpcconnect()
                              Severity: Minor
                              Found in beem/cli.py - About 1 hr to fix

                              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 listdelegations has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def listdelegations(account):
                                  """ List all outgoing delegations from an account.
                              
                                  The default account is used if no other account name is given as
                                      option to this command.
                              Severity: Minor
                              Found in beem/cli.py - About 1 hr to fix

                              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 permissions has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def permissions(account):
                                  """ Show permissions of an account
                                  """
                                  stm = shared_blockchain_instance()
                                  if stm.rpc is not None:
                              Severity: Minor
                              Found in beem/cli.py - About 1 hr to fix

                              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 sign has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def sign(file, outfile):
                                  """Sign a provided transaction with available and required keys"""
                                  stm = shared_blockchain_instance()
                                  if stm.rpc is not None:
                                      stm.rpc.rpcconnect()
                              Severity: Minor
                              Found in beem/cli.py - About 1 hr to fix

                              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

                              Consider simplifying this complex logical expression.
                              Open

                                          if note["type"] == "reblog" and not reblogs:
                                              continue
                                          elif note["type"] == "reply" and not replies:
                                              continue
                                          elif note["type"] == "reply_comment" and not replies:
                              Severity: Major
                              Found in beem/cli.py - About 1 hr to fix

                                Consider simplifying this complex logical expression.
                                Open

                                            if author and (permlink or title):
                                                t.add_row([row[0],
                                                           permlink_row,
                                                           "%.1f days" % row[2],
                                                           "%.3f" % float(row[3]),
                                Severity: Major
                                Found in beem/cli.py - About 1 hr to fix

                                  Function history has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def history(account, limit, sort, max_length, virtual_ops, only_ops, exclude_ops, json_file):
                                  Severity: Major
                                  Found in beem/cli.py - About 1 hr to fix

                                    Function tradehistory has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def tradehistory(days, hours, sbd_to_steem, hbd_to_hive, limit, width, height, ascii):
                                    Severity: Major
                                    Found in beem/cli.py - About 1 hr to fix

                                      Function witnesscreate has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      def witnesscreate(witness, pub_signing_key, maximum_block_size, account_creation_fee, sbd_interest_rate, hbd_interest_rate, url, export):
                                      Severity: Major
                                      Found in beem/cli.py - About 1 hr to fix

                                        Function claimreward has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                        def claimreward(account, reward_steem, reward_sbd, reward_vests, claim_all_steem, claim_all_sbd, claim_all_vests, export):
                                        Severity: Major
                                        Found in beem/cli.py - About 1 hr to fix

                                          Function witnessupdate has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                          def witnessupdate(witness, maximum_block_size, account_creation_fee, sbd_interest_rate, hbd_interest_rate, url, signing_key, export):
                                          Severity: Major
                                          Found in beem/cli.py - About 1 hr to fix

                                            Consider simplifying this complex logical expression.
                                            Open

                                                        if author and (permlink or title):
                                                            t.add_row([row[0],
                                                                       permlink_row,
                                                                       "%.1f days" % row[2],
                                                                       "%.3f" % float(row[3]),
                                            Severity: Major
                                            Found in beem/cli.py - About 1 hr to fix

                                              Function currentnode has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                              def currentnode(version, url):
                                                  """ Sets the currently working node at the first place in the list
                                                  """
                                                  stm = shared_blockchain_instance()
                                                  if stm.rpc is not None:
                                              Severity: Minor
                                              Found in beem/cli.py - About 55 mins to fix

                                              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 listkeys has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                              def listkeys(path, ledger_approval):
                                                  """ Show stored keys
                                              
                                                  Can be used to receive and approve the pubkey obtained from the ledger
                                                  """
                                              Severity: Minor
                                              Found in beem/cli.py - About 55 mins to fix

                                              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 createwallet has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                              def createwallet(wipe):
                                                  """ Create new wallet with a new password
                                                  """
                                                  stm = shared_blockchain_instance()
                                                  if stm.rpc is not None:
                                              Severity: Minor
                                              Found in beem/cli.py - About 55 mins to fix

                                              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 delegate has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                              def delegate(amount, to_account, account, export):
                                                  """Delegate (start delegating VESTS to another account)
                                              
                                                      amount is in VESTS / Steem
                                                  """
                                              Severity: Minor
                                              Found in beem/cli.py - About 55 mins to fix

                                              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 updatenodes has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                              def updatenodes(show, hive, steem, blurt, test, only_https, only_wss):
                                              Severity: Major
                                              Found in beem/cli.py - About 50 mins to fix

                                                Function passwordgen has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                def passwordgen(role, account, import_password, import_coldcard, wif, export_pub, export):
                                                Severity: Major
                                                Found in beem/cli.py - About 50 mins to fix

                                                  Function changekeys has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                  def changekeys(account, owner, active, posting, memo, import_pub, export):
                                                  Severity: Major
                                                  Found in beem/cli.py - About 50 mins to fix

                                                    Function sell has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                    def sell(amount, asset, price, account, orderid, export):
                                                    Severity: Minor
                                                    Found in beem/cli.py - About 45 mins to fix

                                                      Function votes has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                      Open

                                                      def votes(account, direction, outgoing, incoming, days, export):
                                                      Severity: Minor
                                                      Found in beem/cli.py - About 45 mins to fix

                                                        Function allow has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open

                                                        def allow(foreign_account, permission, account, weight, threshold, export):
                                                        Severity: Minor
                                                        Found in beem/cli.py - About 45 mins to fix

                                                          Function orderbook has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                          Open

                                                          def orderbook(chart, limit, show_date, width, height, ascii):
                                                          Severity: Minor
                                                          Found in beem/cli.py - About 45 mins to fix

                                                            Function updatememokey has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                            Open

                                                            def updatememokey(account, key, export):
                                                                """Update an account\'s memo key"""
                                                                stm = shared_blockchain_instance()
                                                                if stm.rpc is not None:
                                                                    stm.rpc.rpcconnect()
                                                            Severity: Minor
                                                            Found in beem/cli.py - About 45 mins to fix

                                                            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 decrypt has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open

                                                            def decrypt(memo, account, output, info, text, binary):
                                                            Severity: Minor
                                                            Found in beem/cli.py - About 45 mins to fix

                                                              Function disallow has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                              def disallow(foreign_account, permission, account, threshold, export):
                                                                  """Remove allowance an account/key to interact with your account"""
                                                                  stm = shared_blockchain_instance()
                                                                  if stm.rpc is not None:
                                                                      stm.rpc.rpcconnect()
                                                              Severity: Minor
                                                              Found in beem/cli.py - About 45 mins to fix

                                                              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 downvote has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                              def downvote(post, account, weight, export):
                                                                  """Downvote a post/comment
                                                              
                                                                      POST is @author/permlink
                                                                  """
                                                              Severity: Minor
                                                              Found in beem/cli.py - About 45 mins to fix

                                                              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 allow has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                              def allow(foreign_account, permission, account, weight, threshold, export):
                                                                  """Allow an account/key to interact with your account
                                                              
                                                                      foreign_account: The account or key that will be allowed to interact with account.
                                                                          When not given, password will be asked, from which a public key is derived.
                                                              Severity: Minor
                                                              Found in beem/cli.py - About 45 mins to fix

                                                              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 customjson has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                              def customjson(jsonid, json_data, account, active, export):
                                                                  """Broadcasts a custom json
                                                              
                                                                      First parameter is the cusom json id, the second field is a json file or a json key value combination
                                                                      e.g. beempy customjson -a holger80 dw-heist username holger80 amount 100
                                                              Severity: Minor
                                                              Found in beem/cli.py - About 45 mins to fix

                                                              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 buy has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                              Open

                                                              def buy(amount, asset, price, account, orderid, export):
                                                              Severity: Minor
                                                              Found in beem/cli.py - About 45 mins to fix

                                                                Function transfer has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                def transfer(to, amount, asset, memo, account, export):
                                                                Severity: Minor
                                                                Found in beem/cli.py - About 45 mins to fix

                                                                  Function encrypt has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                  Open

                                                                  def encrypt(receiver, memo, account, output, text, binary):
                                                                  Severity: Minor
                                                                  Found in beem/cli.py - About 45 mins to fix

                                                                    Avoid deeply nested control flow statements.
                                                                    Open

                                                                                        if (key in ["json_metadata"]):
                                                                                            value = json.loads(value)
                                                                                            value = json.dumps(value, indent=4)
                                                                                        elif (key in ["tags", "active_votes"]):
                                                                                            value = json.dumps(value, indent=4)
                                                                    Severity: Major
                                                                    Found in beem/cli.py - About 45 mins to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                                          if not post and not c.is_comment():
                                                                                              continue
                                                                                          if not comment and c.is_comment():
                                                                      Severity: Major
                                                                      Found in beem/cli.py - About 45 mins to fix

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                            if title:
                                                                                                c = Comment(construct_authorperm(v["comment_author"], v["comment_permlink"]), blockchain_instance=stm)
                                                                                                permlink_row = c.title
                                                                                            else:
                                                                                                permlink_row = v["comment_permlink"]
                                                                        Severity: Major
                                                                        Found in beem/cli.py - About 45 mins to fix

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

                                                                                              if title:
                                                                                                  permlink_row = v.title
                                                                                              else:
                                                                                                  permlink_row = v.permlink
                                                                                          rows.append([v["author"],
                                                                          Severity: Major
                                                                          Found in beem/cli.py - About 45 mins to fix

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

                                                                                                if m.check_word(word):
                                                                                                    word_array.append(word)
                                                                                                print(" ".join(word_array))
                                                                            Severity: Major
                                                                            Found in beem/cli.py - About 45 mins to fix

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                                  if key == "transactions" and not bool(tran_nr):
                                                                                                      t.add_row(["Nr. of transactions", len(value)])
                                                                                                  elif key == "transactions" and bool(tran_nr):
                                                                                                      if int(tran_nr) < 0:
                                                                                                          tran_nr = len(value) + int(tran_nr)
                                                                              Severity: Major
                                                                              Found in beem/cli.py - About 45 mins to fix

                                                                                Avoid deeply nested control flow statements.
                                                                                Open

                                                                                                    if key in ["body", "active_votes"]:
                                                                                                        value = "not shown"
                                                                                                    else:
                                                                                                        value = post_json[key]
                                                                                                    if (key in ["json_metadata"]):
                                                                                Severity: Major
                                                                                Found in beem/cli.py - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

                                                                                                      if c.is_comment():
                                                                                                          permlink_row = c.parent_permlink
                                                                                                      else:
                                                                                                          if title:
                                                                                                              permlink_row = c.title
                                                                                  Severity: Major
                                                                                  Found in beem/cli.py - About 45 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                                        if not comment and c.is_comment():
                                                                                                            continue
                                                                                                        if "sbd_payout" in v:
                                                                                    Severity: Major
                                                                                    Found in beem/cli.py - About 45 mins to fix

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                          if "sbd_payout" in v:
                                                                                                              payout_SBD = Amount(v["sbd_payout"], blockchain_instance=stm)
                                                                                                              payout_STEEM = Amount(v["steem_payout"], blockchain_instance=stm)
                                                                                                          else:
                                                                                                              payout_SBD = Amount(v["hbd_payout"], blockchain_instance=stm)
                                                                                      Severity: Major
                                                                                      Found in beem/cli.py - About 45 mins to fix

                                                                                        Consider simplifying this complex logical expression.
                                                                                        Open

                                                                                            if stm.unsigned and stm.nobroadcast and stm.steemconnect is not None:
                                                                                                tx = stm.claim_account(creator, fee=fee)
                                                                                                tx = stm.steemconnect.url_from_tx(tx)
                                                                                            elif stm.unsigned and stm.nobroadcast and stm.hivesigner is not None:
                                                                                                tx = stm.claim_account(creator, fee=fee)
                                                                                        Severity: Major
                                                                                        Found in beem/cli.py - About 40 mins to fix

                                                                                          Consider simplifying this complex logical expression.
                                                                                          Open

                                                                                                  if (all_posts or export) and permlink:
                                                                                                      if length:
                                                                                                          new_row = [comment.author, comment.permlink[:int(length)]]
                                                                                                      else:
                                                                                                          new_row = [comment.author, comment.permlink]
                                                                                          Severity: Major
                                                                                          Found in beem/cli.py - About 40 mins to fix

                                                                                            Function disallow has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                            Open

                                                                                            def disallow(foreign_account, permission, account, threshold, export):
                                                                                            Severity: Minor
                                                                                            Found in beem/cli.py - About 35 mins to fix

                                                                                              Function powerdownroute has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                              Open

                                                                                              def powerdownroute(to, percentage, account, auto_vest, export):
                                                                                              Severity: Minor
                                                                                              Found in beem/cli.py - About 35 mins to fix

                                                                                                Function setprofile has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                Open

                                                                                                def setprofile(variable, value, account, pair, export):
                                                                                                Severity: Minor
                                                                                                Found in beem/cli.py - About 35 mins to fix

                                                                                                  Function reply has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                  def reply(authorperm, body, account, title, export):
                                                                                                  Severity: Minor
                                                                                                  Found in beem/cli.py - About 35 mins to fix

                                                                                                    Function customjson has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                    def customjson(jsonid, json_data, account, active, export):
                                                                                                    Severity: Minor
                                                                                                    Found in beem/cli.py - About 35 mins to fix

                                                                                                      Function witnessfeed has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                      def witnessfeed(witness, wif, base, quote, support_peg):
                                                                                                      Severity: Minor
                                                                                                      Found in beem/cli.py - About 35 mins to fix

                                                                                                        Function config has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                        def config():
                                                                                                            """ Shows local configuration
                                                                                                            """
                                                                                                            stm = shared_blockchain_instance()
                                                                                                            t = PrettyTable(["Key", "Value"])
                                                                                                        Severity: Minor
                                                                                                        Found in beem/cli.py - About 35 mins to fix

                                                                                                        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 followlist has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                        def followlist(follow_type, account, limit):
                                                                                                            """ Get information about followed lists
                                                                                                        
                                                                                                            follow_type can be blog
                                                                                                            On Hive, follow type can also be one the following: blacklisted, follow_blacklist, muted, or follow_muted
                                                                                                        Severity: Minor
                                                                                                        Found in beem/cli.py - About 35 mins to fix

                                                                                                        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 reply has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                        def reply(authorperm, body, account, title, export):
                                                                                                            """replies to a comment"""
                                                                                                            stm = shared_blockchain_instance()
                                                                                                            if stm.rpc is not None:
                                                                                                                stm.rpc.rpcconnect()
                                                                                                        Severity: Minor
                                                                                                        Found in beem/cli.py - About 35 mins to fix

                                                                                                        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 featureflags has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                        def featureflags(account, signing_account):
                                                                                                            """ Get the account's feature flags.
                                                                                                        
                                                                                                                The request has to be signed by the requested account or an admin account.
                                                                                                            """
                                                                                                        Severity: Minor
                                                                                                        Found in beem/cli.py - About 35 mins to fix

                                                                                                        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 witnesses has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                        def witnesses(account, limit):
                                                                                                            """ List witnesses
                                                                                                            """
                                                                                                            stm = shared_blockchain_instance()
                                                                                                            if stm.rpc is not None:
                                                                                                        Severity: Minor
                                                                                                        Found in beem/cli.py - About 35 mins to fix

                                                                                                        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 broadcast has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                        def broadcast(file):
                                                                                                            """broadcast a signed transaction"""
                                                                                                            stm = shared_blockchain_instance()
                                                                                                            if stm.rpc is not None:
                                                                                                                stm.rpc.rpcconnect()
                                                                                                        Severity: Minor
                                                                                                        Found in beem/cli.py - About 35 mins to fix

                                                                                                        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 userdata has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                        def userdata(account, signing_account):
                                                                                                            """ Get the account's email address and phone number.
                                                                                                        
                                                                                                                The request has to be signed by the requested account or an admin account.
                                                                                                            """
                                                                                                        Severity: Minor
                                                                                                        Found in beem/cli.py - About 35 mins to fix

                                                                                                        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

                                                                                                        Avoid too many return statements within this function.
                                                                                                        Open

                                                                                                                return True
                                                                                                        Severity: Major
                                                                                                        Found in beem/cli.py - About 30 mins to fix

                                                                                                          Avoid too many return statements within this function.
                                                                                                          Open

                                                                                                                  return False
                                                                                                          Severity: Major
                                                                                                          Found in beem/cli.py - About 30 mins to fix

                                                                                                            Avoid too many return statements within this function.
                                                                                                            Open

                                                                                                                                return True
                                                                                                            Severity: Major
                                                                                                            Found in beem/cli.py - About 30 mins to fix

                                                                                                              Avoid too many return statements within this function.
                                                                                                              Open

                                                                                                                              return True
                                                                                                              Severity: Major
                                                                                                              Found in beem/cli.py - About 30 mins to fix

                                                                                                                Avoid too many return statements within this function.
                                                                                                                Open

                                                                                                                        return True
                                                                                                                Severity: Major
                                                                                                                Found in beem/cli.py - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this function.
                                                                                                                  Open

                                                                                                                                      return True
                                                                                                                  Severity: Major
                                                                                                                  Found in beem/cli.py - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this function.
                                                                                                                    Open

                                                                                                                                        return True
                                                                                                                    Severity: Major
                                                                                                                    Found in beem/cli.py - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this function.
                                                                                                                      Open

                                                                                                                              return False
                                                                                                                      Severity: Major
                                                                                                                      Found in beem/cli.py - About 30 mins to fix

                                                                                                                        Function powerdown has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        def powerdown(amount, account, export):
                                                                                                                            """Power down (start withdrawing VESTS from Steem POWER)
                                                                                                                        
                                                                                                                                amount is in VESTS
                                                                                                                            """
                                                                                                                        Severity: Minor
                                                                                                                        Found in beem/cli.py - About 25 mins to fix

                                                                                                                        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 witnesscreate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        def witnesscreate(witness, pub_signing_key, maximum_block_size, account_creation_fee, sbd_interest_rate, hbd_interest_rate, url, export):
                                                                                                                            """Create a witness"""
                                                                                                                            stm = shared_blockchain_instance()
                                                                                                                            if stm.rpc is not None:
                                                                                                                                stm.rpc.rpcconnect()
                                                                                                                        Severity: Minor
                                                                                                                        Found in beem/cli.py - About 25 mins to fix

                                                                                                                        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 transfer has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        def transfer(to, amount, asset, memo, account, export):
                                                                                                                            """Transfer SBD/HBD or STEEM/HIVE"""
                                                                                                                            stm = shared_blockchain_instance()
                                                                                                                            if stm.rpc is not None:
                                                                                                                                stm.rpc.rpcconnect()
                                                                                                                        Severity: Minor
                                                                                                                        Found in beem/cli.py - About 25 mins to fix

                                                                                                                        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 changerecovery has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        def changerecovery(new_recovery_account, account, export):
                                                                                                                            """Changes the recovery account with the owner key (needs 30 days to be active)"""
                                                                                                                            stm = shared_blockchain_instance()
                                                                                                                            if stm.rpc is not None:
                                                                                                                                stm.rpc.rpcconnect()
                                                                                                                        Severity: Minor
                                                                                                                        Found in beem/cli.py - About 25 mins to fix

                                                                                                                        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 follow has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        def follow(follow, account, what, export):
                                                                                                                            """Follow another account
                                                                                                                        
                                                                                                                               Can be blog ignore blacklist unblacklist follow_blacklist unfollow_blacklist follow_muted unfollow_muted on HIVE
                                                                                                                            """
                                                                                                                        Severity: Minor
                                                                                                                        Found in beem/cli.py - About 25 mins to fix

                                                                                                                        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 powerdownroute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        def powerdownroute(to, percentage, account, auto_vest, export):
                                                                                                                            """Setup a powerdown route"""
                                                                                                                            stm = shared_blockchain_instance()
                                                                                                                            if stm.rpc is not None:
                                                                                                                                stm.rpc.rpcconnect()
                                                                                                                        Severity: Minor
                                                                                                                        Found in beem/cli.py - About 25 mins to fix

                                                                                                                        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 delprofile has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        def delprofile(variable, account, export):
                                                                                                                            """Delete a variable in an account\'s profile"""
                                                                                                                            stm = shared_blockchain_instance()
                                                                                                                            if stm.rpc is not None:
                                                                                                                                stm.rpc.rpcconnect()
                                                                                                                        Severity: Minor
                                                                                                                        Found in beem/cli.py - About 25 mins to fix

                                                                                                                        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 witnessdisable has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        def witnessdisable(witness, export):
                                                                                                                            """Disable a witness"""
                                                                                                                            stm = shared_blockchain_instance()
                                                                                                                            if stm.rpc is not None:
                                                                                                                                stm.rpc.rpcconnect()
                                                                                                                        Severity: Minor
                                                                                                                        Found in beem/cli.py - About 25 mins to fix

                                                                                                                        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 delete has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        def delete(post, account, export):
                                                                                                                            """delete a post/comment
                                                                                                                        
                                                                                                                                POST is @author/permlink
                                                                                                                            """
                                                                                                                        Severity: Minor
                                                                                                                        Found in beem/cli.py - About 25 mins to fix

                                                                                                                        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 mute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        def mute(mute, account, what, export):
                                                                                                                            """Mute another account"""
                                                                                                                            stm = shared_blockchain_instance()
                                                                                                                            if stm.rpc is not None:
                                                                                                                                stm.rpc.rpcconnect()
                                                                                                                        Severity: Minor
                                                                                                                        Found in beem/cli.py - About 25 mins to fix

                                                                                                                        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 convert has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        def convert(amount, account, export):
                                                                                                                            """Convert SBD/HBD to Steem/Hive (takes a week to settle)"""
                                                                                                                            stm = shared_blockchain_instance()
                                                                                                                            if stm.rpc is not None:
                                                                                                                                stm.rpc.rpcconnect()
                                                                                                                        Severity: Minor
                                                                                                                        Found in beem/cli.py - About 25 mins to fix

                                                                                                                        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 powerup has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        def powerup(amount, account, to, export):
                                                                                                                            """Power up (vest STEEM/HIVE as STEEM/HIVE POWER)"""
                                                                                                                            stm = shared_blockchain_instance()
                                                                                                                            if stm.rpc is not None:
                                                                                                                                stm.rpc.rpcconnect()
                                                                                                                        Severity: Minor
                                                                                                                        Found in beem/cli.py - About 25 mins to fix

                                                                                                                        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 "keygen" has 12 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def keygen(import_word_list, strength, passphrase, path, network, role, account_keys, sequence, account, wif, export_pub, export):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Function "rewards" has 10 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def rewards(accounts, only_sum, post, comment, curation, length, author, permlink, title, days):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Function "post" has 15 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def post(markdown_file, account, title, permlink, tags, reply_identifier, community, canonical_url, beneficiaries, percent_steem_dollars, percent_hbd, max_accepted_payout, no_parse_body, no_patch_on_edit, export):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 29 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def cli(node, offline, no_broadcast, no_wallet, unsigned, create_link, steem, hive, keys, use_ledger, path, token, expires, verbose):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Function "witnessupdate" has 8 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def witnessupdate(witness, maximum_block_size, account_creation_fee, sbd_interest_rate, hbd_interest_rate, url, signing_key, export):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Function "history" has 8 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def history(account, limit, sort, max_length, virtual_ops, only_ops, exclude_ops, json_file):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def parsewif(unsafe_import_key):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Function "tradehistory" has 8 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def tradehistory(days, hours, sbd_to_steem, hbd_to_hive, limit, width, height, ascii):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Function "claimreward" has 8 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def claimreward(account, reward_steem, reward_sbd, reward_vests, claim_all_steem, claim_all_sbd, claim_all_vests, export):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def unlock_token_wallet(stm, sc2, password=None):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Function "curation" has 14 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def curation(authorperm, account, limit, min_vote, max_vote, min_performance, max_performance, payout, export, short, length, permlink, title, days):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Function "cli" has 14 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def cli(node, offline, no_broadcast, no_wallet, unsigned, create_link, steem, hive, keys, use_ledger, path, token, expires, verbose):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Function "witnessproperties" has 10 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def witnessproperties(witness, wif, account_creation_fee, account_subsidy_budget, account_subsidy_decay, maximum_block_size, sbd_interest_rate, hbd_interest_rate, new_signing_key, url):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Function "pending" has 11 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def pending(accounts, only_sum, post, comment, curation, length, author, permlink, title, days, _from):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Function "notifications" has 10 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def notifications(account, limit, all, mark_as_read, replies, mentions, follows, votes, reblogs, reverse):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Function "draw" has 10 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def draw(block, trx_id, draws, participants, hashtype, separator, account, reply, without_replacement, markdown):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Function "witnesscreate" has 8 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def witnesscreate(witness, pub_signing_key, maximum_block_size, account_creation_fee, sbd_interest_rate, hbd_interest_rate, url, export):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 56 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def unlock_wallet(stm, password=None, allow_wif=True):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Function "createpost" has 10 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def createpost(markdown_file, account, title, tags, community, beneficiaries, percent_steem_dollars, percent_hbd, max_accepted_payout, no_parse_body):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 27 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def updatenodes(show, hive, steem, blurt, test, only_https, only_wss):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Function "newaccount" has 10 parameters, which is greater than the 7 authorized.
                                                                                                                        Open

                                                                                                                        def newaccount(accountname, account, owner, active, memo, posting, wif, create_claimed_account, import_pub, export):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                                                                                                                        Noncompliant Code Example

                                                                                                                        With a maximum number of 4 parameters:

                                                                                                                        def do_something(param1, param2, param3, param4, param5):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        def do_something(param1, param2, param3, param4):
                                                                                                                            ...
                                                                                                                        

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 32 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def set(key, value):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 47 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def decrypt(memo, account, output, info, text, binary):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 90 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def post(markdown_file, account, title, permlink, tags, reply_identifier, community, canonical_url, beneficiaries, percent_steem_dollars, percent_hbd, max_accepted_payout, no_parse_body, no_patch_on_edit, export):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 29 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def encrypt(receiver, memo, account, output, text, binary):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def listaccounts(role, max_account_index, max_sequence):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 45 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def createpost(markdown_file, account, title, tags, community, beneficiaries, percent_steem_dollars, percent_hbd, max_accepted_payout, no_parse_body):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 41 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def orderbook(chart, limit, show_date, width, height, ascii):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 122 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def curation(authorperm, account, limit, min_vote, max_vote, min_performance, max_performance, payout, export, short, length, permlink, title, days):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def claimaccount(creator, fee, number, export):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 135 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def info(objects):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 75 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def keygen(import_word_list, strength, passphrase, path, network, role, account_keys, sequence, account, wif, export_pub, export):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def witness(witness):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 42 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def verify(blocknumber, trx, use_api):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 114 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def rewards(accounts, only_sum, post, comment, curation, length, author, permlink, title, days):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def passwordgen(role, account, import_password, import_coldcard, wif, export_pub, export):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def changekeys(account, owner, active, posting, memo, import_pub, export):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def sell(amount, asset, price, account, orderid, export):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 22 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def importaccount(account, roles, import_coldcard, wif):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 74 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def download(permlink, account, save, export):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def newaccount(accountname, account, owner, active, memo, posting, wif, create_claimed_account, import_pub, export):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 30 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def notifications(account, limit, all, mark_as_read, replies, mentions, follows, votes, reblogs, reverse):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 37 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def stream(lines, head, table, follow):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def buy(amount, asset, price, account, orderid, export):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 40 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def witnessfeed(witness, wif, base, quote, support_peg):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 126 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def pending(accounts, only_sum, post, comment, curation, length, author, permlink, title, days, _from):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 43 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def draw(block, trx_id, draws, participants, hashtype, separator, account, reply, without_replacement, markdown):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Refactor this function to reduce its Cognitive Complexity from 42 to the 15 allowed.
                                                                                                                        Open

                                                                                                                        def history(account, limit, sort, max_length, virtual_ops, only_ops, exclude_ops, json_file):
                                                                                                                        Severity: Critical
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                                                                                                                        See

                                                                                                                        Either merge this branch with the identical one on line "1793" or change one of the implementations.
                                                                                                                        Open

                                                                                                                                        continue
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_thing()  # Noncompliant; duplicates first condition
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4 if a > 12 else 4
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if (0 <= a < 10) or (20 <= a < 50):
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4
                                                                                                                        

                                                                                                                        or

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_third_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 8 if a > 12 else 4
                                                                                                                        

                                                                                                                        Either merge this branch with the identical one on line "4032" or change one of the implementations.
                                                                                                                        Open

                                                                                                                                t = PrettyTable(["Author", "permlink", "Voter", "Voting time", "Vote", "Early vote loss", "Curation", "Performance"])
                                                                                                                                t.align = "l"
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_thing()  # Noncompliant; duplicates first condition
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4 if a > 12 else 4
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if (0 <= a < 10) or (20 <= a < 50):
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4
                                                                                                                        

                                                                                                                        or

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_third_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 8 if a > 12 else 4
                                                                                                                        

                                                                                                                        Either merge this branch with the identical one on line "4023" or change one of the implementations.
                                                                                                                        Open

                                                                                                                                t = PrettyTable(["Author", "permlink", "Voting time", "Vote", "Early vote loss", "Curation", "Performance"])
                                                                                                                                t.align = "l"
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_thing()  # Noncompliant; duplicates first condition
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4 if a > 12 else 4
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if (0 <= a < 10) or (20 <= a < 50):
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4
                                                                                                                        

                                                                                                                        or

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_third_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 8 if a > 12 else 4
                                                                                                                        

                                                                                                                        Either merge this branch with the identical one on line "4618" or change one of the implementations.
                                                                                                                        Open

                                                                                                                                print("Nothing to claim.")
                                                                                                                                return
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_thing()  # Noncompliant; duplicates first condition
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4 if a > 12 else 4
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if (0 <= a < 10) or (20 <= a < 50):
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4
                                                                                                                        

                                                                                                                        or

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_third_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 8 if a > 12 else 4
                                                                                                                        

                                                                                                                        Either merge this branch with the identical one on line "2817" or change one of the implementations.
                                                                                                                        Open

                                                                                                                                    tx = iu.upload(image, author, image_name)
                                                                                                                                    body = body.replace(image, tx["url"])
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_thing()  # Noncompliant; duplicates first condition
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4 if a > 12 else 4
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if (0 <= a < 10) or (20 <= a < 50):
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4
                                                                                                                        

                                                                                                                        or

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_third_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 8 if a > 12 else 4
                                                                                                                        

                                                                                                                        Either merge this branch with the identical one on line "1793" or change one of the implementations.
                                                                                                                        Open

                                                                                                                                        continue
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_thing()  # Noncompliant; duplicates first condition
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4 if a > 12 else 4
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if (0 <= a < 10) or (20 <= a < 50):
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4
                                                                                                                        

                                                                                                                        or

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_third_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 8 if a > 12 else 4
                                                                                                                        

                                                                                                                        Either merge this branch with the identical one on line "4471" or change one of the implementations.
                                                                                                                        Open

                                                                                                                                                permlink_row = v.permlink
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_thing()  # Noncompliant; duplicates first condition
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4 if a > 12 else 4
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if (0 <= a < 10) or (20 <= a < 50):
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4
                                                                                                                        

                                                                                                                        or

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_third_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 8 if a > 12 else 4
                                                                                                                        

                                                                                                                        Either merge this branch with the identical one on line "1793" or change one of the implementations.
                                                                                                                        Open

                                                                                                                                        continue
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_thing()  # Noncompliant; duplicates first condition
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4 if a > 12 else 4
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if (0 <= a < 10) or (20 <= a < 50):
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4
                                                                                                                        

                                                                                                                        or

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_third_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 8 if a > 12 else 4
                                                                                                                        

                                                                                                                        Either merge this branch with the identical one on line "1793" or change one of the implementations.
                                                                                                                        Open

                                                                                                                                        continue
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_thing()  # Noncompliant; duplicates first condition
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4 if a > 12 else 4
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if (0 <= a < 10) or (20 <= a < 50):
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4
                                                                                                                        

                                                                                                                        or

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_third_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 8 if a > 12 else 4
                                                                                                                        

                                                                                                                        Either merge this branch with the identical one on line "1793" or change one of the implementations.
                                                                                                                        Open

                                                                                                                                        continue
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_thing()  # Noncompliant; duplicates first condition
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4 if a > 12 else 4
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if (0 <= a < 10) or (20 <= a < 50):
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4
                                                                                                                        

                                                                                                                        or

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_third_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 8 if a > 12 else 4
                                                                                                                        

                                                                                                                        Either merge this branch with the identical one on line "3104" or change one of the implementations.
                                                                                                                        Open

                                                                                                                                        content = "%s: @%s -> @%s" % (str(ops["amount"]), ops["from"], ops["to"])
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_thing()  # Noncompliant; duplicates first condition
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4 if a > 12 else 4
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if (0 <= a < 10) or (20 <= a < 50):
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 4
                                                                                                                        

                                                                                                                        or

                                                                                                                        if 0 <= a < 10:
                                                                                                                            do_the_thing()
                                                                                                                        elif 10 <= a < 20:
                                                                                                                            do_the_other_thing()
                                                                                                                        elif 20 <= a < 50:
                                                                                                                            do_the_third_thing()
                                                                                                                        else:
                                                                                                                            do_the_rest()
                                                                                                                        
                                                                                                                        b = 8 if a > 12 else 4
                                                                                                                        

                                                                                                                        Remove this commented out code.
                                                                                                                        Open

                                                                                                                                    # value = json.dumps(ops, indent=4)
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Programmers should not comment out code as it bloats programs and reduces readability.

                                                                                                                        Unused code should be deleted and can be retrieved from source control history if required.

                                                                                                                        See

                                                                                                                        • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                                                                                                                        • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                                                                                                                        • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                                                                                                                        • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if "default_account" in stm.config:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Merge this if statement with the enclosing one.
                                                                                                                        Open

                                                                                                                                if not unlock_wallet(stm):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py by sonar-python

                                                                                                                        Merging collapsible if statements increases the code's readability.

                                                                                                                        Noncompliant Code Example

                                                                                                                        if condition1:
                                                                                                                            if condition2:
                                                                                                                                # ...
                                                                                                                        

                                                                                                                        Compliant Solution

                                                                                                                        if condition1 and condition2:
                                                                                                                            # ...
                                                                                                                        

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('follow', nargs=-1)
                                                                                                                        @click.option('--account', '-a', help='Follow from this account')
                                                                                                                        @click.option('--what', help='Follow these objects (defaults to ["blog"])', default=["blog"])
                                                                                                                        @click.option('--export', '-e', help='When set, transaction is stored in a file')
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 days to fix
                                                                                                                        beem/cli.py on lines 3525..3549

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 272.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('mute', nargs=1)
                                                                                                                        @click.option('--account', '-a', help='Mute from this account')
                                                                                                                        @click.option('--what', help='Mute these objects (defaults to ["ignore"])', default=["ignore"])
                                                                                                                        @click.option('--export', '-e', help='When set, transaction is stored in a file')
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 days to fix
                                                                                                                        beem/cli.py on lines 3495..3522

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 272.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('amount', nargs=1)
                                                                                                                        @click.option('--account', '-a', help='Powerup from this account')
                                                                                                                        @click.option('--export', '-e', help='When set, transaction is stored in a file')
                                                                                                                        def convert(amount, account, export):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 days to fix
                                                                                                                        beem/cli.py on lines 1342..1370

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 258.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('amount', nargs=1)
                                                                                                                        @click.option('--account', '-a', help='Powerup from this account')
                                                                                                                        @click.option('--export', '-e', help='When set, transaction is stored in a file')
                                                                                                                        def powerdown(amount, account, export):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 days to fix
                                                                                                                        beem/cli.py on lines 1512..1537

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 258.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('unfollow', nargs=1)
                                                                                                                        @click.option('--account', '-a', help='UnFollow/UnMute from this account')
                                                                                                                        @click.option('--export', '-e', help='When set, transaction is stored in a file')
                                                                                                                        def unfollow(unfollow, account, export):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 days to fix
                                                                                                                        beem/cli.py on lines 2933..2954

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 235.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('witness', nargs=1)
                                                                                                                        @click.option('--account', '-a', help='Your account')
                                                                                                                        @click.option('--export', '-e', help='When set, transaction is stored in a file')
                                                                                                                        def disapprovewitness(witness, account, export):
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 days to fix
                                                                                                                        beem/cli.py on lines 3552..3573

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 235.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('account', nargs=1, required=False)
                                                                                                                        @click.option('--signing-account', '-s', help='Signing account, when empty account is used.')
                                                                                                                        def featureflags(account, signing_account):
                                                                                                                            """ Get the account's feature flags.
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 days to fix
                                                                                                                        beem/cli.py on lines 4932..4958

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 224.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('account', nargs=1, required=False)
                                                                                                                        @click.option('--signing-account', '-s', help='Signing account, when empty account is used.')
                                                                                                                        def userdata(account, signing_account):
                                                                                                                            """ Get the account's email address and phone number.
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 days to fix
                                                                                                                        beem/cli.py on lines 5038..5064

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 224.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('account', nargs=-1, required=False)
                                                                                                                        def follower(account):
                                                                                                                            """ Get information about followers
                                                                                                                            """
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 3 other locations - About 1 day to fix
                                                                                                                        beem/cli.py on lines 1701..1716
                                                                                                                        beem/cli.py on lines 1719..1734
                                                                                                                        beem/cli.py on lines 1737..1752

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 144.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('account', nargs=-1, required=False)
                                                                                                                        def following(account):
                                                                                                                            """ Get information about following
                                                                                                                            """
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 3 other locations - About 1 day to fix
                                                                                                                        beem/cli.py on lines 1683..1698
                                                                                                                        beem/cli.py on lines 1719..1734
                                                                                                                        beem/cli.py on lines 1737..1752

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 144.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('account', nargs=-1, required=False)
                                                                                                                        def muting(account):
                                                                                                                            """ Get information about muting
                                                                                                                            """
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 3 other locations - About 1 day to fix
                                                                                                                        beem/cli.py on lines 1683..1698
                                                                                                                        beem/cli.py on lines 1701..1716
                                                                                                                        beem/cli.py on lines 1719..1734

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 144.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('account', nargs=-1, required=False)
                                                                                                                        def muter(account):
                                                                                                                            """ Get information about muter
                                                                                                                            """
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 3 other locations - About 1 day to fix
                                                                                                                        beem/cli.py on lines 1683..1698
                                                                                                                        beem/cli.py on lines 1701..1716
                                                                                                                        beem/cli.py on lines 1737..1752

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 144.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            try:
                                                                                                                                post = Comment(post, blockchain_instance=stm)
                                                                                                                                tx = post.upvote(weight, voter=account)
                                                                                                                                if stm.unsigned and stm.nobroadcast and stm.steemconnect is not None:
                                                                                                                                    tx = stm.steemconnect.url_from_tx(tx)
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 7 hrs to fix
                                                                                                                        beem/cli.py on lines 1269..1278

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 116.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            try:
                                                                                                                                post = Comment(post, blockchain_instance=stm)
                                                                                                                                tx = post.downvote(weight, voter=account)
                                                                                                                                if stm.unsigned and stm.nobroadcast and stm.steemconnect is not None:
                                                                                                                                    tx = stm.steemconnect.url_from_tx(tx)
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 7 hrs to fix
                                                                                                                        beem/cli.py on lines 1198..1207

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 116.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            if file and file != "-":
                                                                                                                                if not os.path.isfile(file):
                                                                                                                                    raise Exception("File %s does not exist!" % file)
                                                                                                                                with open(file) as fp:
                                                                                                                                    tx = fp.read()
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 7 hrs to fix
                                                                                                                        beem/cli.py on lines 3041..3050

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 114.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            if file and file != "-":
                                                                                                                                if not os.path.isfile(file):
                                                                                                                                    raise Exception("File %s does not exist!" % file)
                                                                                                                                with open(file) as fp:
                                                                                                                                    tx = fp.read()
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 7 hrs to fix
                                                                                                                        beem/cli.py on lines 3014..3023

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 114.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            if "owner" in roles:
                                                                                                                                owner_key = PasswordKey(account["name"], password, role="owner")
                                                                                                                                owner_pubkey = format(owner_key.get_public_key(), stm.prefix)
                                                                                                                                if owner_pubkey in [x[0] for x in account["owner"]["key_auths"]]:
                                                                                                                                    print("Importing owner key!")
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 2 other locations - About 7 hrs to fix
                                                                                                                        beem/cli.py on lines 2197..2204
                                                                                                                        beem/cli.py on lines 2206..2215

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 110.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            if "posting" in roles:
                                                                                                                                posting_key = PasswordKey(account["name"], password, role="posting")
                                                                                                                                posting_pubkey = format(posting_key.get_public_key(), stm.prefix)
                                                                                                                                if posting_pubkey in [
                                                                                                                                    x[0] for x in account["posting"]["key_auths"]
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 2 other locations - About 7 hrs to fix
                                                                                                                        beem/cli.py on lines 2188..2195
                                                                                                                        beem/cli.py on lines 2197..2204

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 110.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            if "active" in roles:
                                                                                                                                active_key = PasswordKey(account["name"], password, role="active")
                                                                                                                                active_pubkey = format(active_key.get_public_key(), stm.prefix)
                                                                                                                                if active_pubkey in [x[0] for x in account["active"]["key_auths"]]:
                                                                                                                                    print("Importing active key!")
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 2 other locations - About 7 hrs to fix
                                                                                                                        beem/cli.py on lines 2188..2195
                                                                                                                        beem/cli.py on lines 2206..2215

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 110.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                    t.add_row(sum_line + ["%.1f min" % highest_vote[1],
                                                                                                                                                          "%.3f %s" % (float(highest_vote[2]), stm.backed_token_symbol),
                                                                                                                                                          "%.3f %s" % (float(highest_vote[3]), stm.backed_token_symbol),
                                                                                                                                                          "%.3f %s" % (highest_vote[4], SP_symbol),
                                                                                                                                                          "%.1f %%" % (highest_vote[5])])
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 6 hrs to fix
                                                                                                                        beem/cli.py on lines 4151..4155

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 102.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                    t.add_row(sum_line + ["%.1f min" % max_curation[1],
                                                                                                                                                          "%.3f %s" % (float(max_curation[2]), stm.backed_token_symbol),
                                                                                                                                                          "%.3f %s" % (float(max_curation[3]), stm.backed_token_symbol),
                                                                                                                                                          "%.3f %s" % (max_curation[4], SP_symbol),
                                                                                                                                                          "%.1f %%" % (max_curation[5])])
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 6 hrs to fix
                                                                                                                        beem/cli.py on lines 4145..4149

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 102.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                if "beneficiaries" in comment:
                                                                                                                                    beneficiaries = []
                                                                                                                                    for b in comment["beneficiaries"]:
                                                                                                                                        beneficiaries.append("%s:%.2f%%" % (b["account"], b["weight"] / 10000 * 100))
                                                                                                                                    if len(beneficiaries) > 0:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 6 hrs to fix
                                                                                                                        beem/utils.py on lines 413..418

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 102.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                elif hashtype == "sha512":
                                                                                                                                    seed = hashlib.sha512((trx_id + block["block_id"] + block["previous"] + separator +str(i + 1)).encode()).digest()
                                                                                                                                    bigRand = int.from_bytes(seed, 'big')
                                                                                                                                    number = bigRand % (len(draw_list))
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 5 hrs to fix
                                                                                                                        beem/cli.py on lines 5146..5149

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 93.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                elif hashtype == "sha256":
                                                                                                                                    seed = hashlib.sha256((trx_id + block["block_id"] + block["previous"] + separator +str(i + 1)).encode()).digest()
                                                                                                                                    bigRand = int.from_bytes(seed, 'big')
                                                                                                                                    number = bigRand % (len(draw_list))
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 5 hrs to fix
                                                                                                                        beem/cli.py on lines 5150..5153

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 93.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                    try:
                                                                                                                                        pubkey = PrivateKey(key, prefix=stm.prefix).pubkey
                                                                                                                                        print(pubkey)
                                                                                                                                        account = stm.wallet.getAccountFromPublicKey(str(pubkey))
                                                                                                                                        account = Account(account, blockchain_instance=stm)
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 5 hrs to fix
                                                                                                                        beem/cli.py on lines 749..755

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 87.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                    try:
                                                                                                                                        pubkey = PrivateKey(wifkey, prefix=stm.prefix).pubkey
                                                                                                                                        print(pubkey)
                                                                                                                                        account = stm.wallet.getAccountFromPublicKey(str(pubkey))
                                                                                                                                        account = Account(account, blockchain_instance=stm)
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 5 hrs to fix
                                                                                                                        beem/cli.py on lines 735..741

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 87.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                for key in info:
                                                                                                                                    if isinstance(info[key], dict) and 'amount' in info[key]:
                                                                                                                                        t.add_row([key, str(Amount(info[key], blockchain_instance=stm))])
                                                                                                                                    else:
                                                                                                                                        t.add_row([key, info[key]])
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 5 hrs to fix
                                                                                                                        beem/cli.py on lines 4759..4763

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 87.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            for key in chain_config:
                                                                                                                                if isinstance(chain_config[key], dict) and 'amount' in chain_config[key]:
                                                                                                                                    t.add_row([key, str(Amount(chain_config[key], blockchain_instance=stm))])
                                                                                                                                else:
                                                                                                                                    t.add_row([key, chain_config[key]])
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 5 hrs to fix
                                                                                                                        beem/cli.py on lines 4789..4793

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 87.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            elif quote is None and not stm.is_hive:
                                                                                                                                latest_price = market.ticker()['latest']
                                                                                                                                if steem_usd is None:
                                                                                                                                    steem_usd = market.steem_usd_implied()
                                                                                                                                sbd_usd = float(latest_price.as_base(stm.backed_token_symbol)) * steem_usd
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 4 hrs to fix
                                                                                                                        beem/cli.py on lines 3796..3801

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 80.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            elif quote is None and stm.is_hive:
                                                                                                                                latest_price = market.ticker()['latest']
                                                                                                                                if hive_usd is None:
                                                                                                                                    hive_usd = market.hive_usd_implied()
                                                                                                                                hbd_usd = float(latest_price.as_base(stm.backed_token_symbol)) * hive_usd
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 4 hrs to fix
                                                                                                                        beem/cli.py on lines 3790..3795

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 80.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            if export and export != "":
                                                                                                                                with open(export, 'w') as fp:
                                                                                                                                    fp.write(str(t))
                                                                                                                                    fp.write("\n")
                                                                                                                                    fp.write(str(t_pub))
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 4 hrs to fix
                                                                                                                        beem/cli.py on lines 1019..1027

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 77.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('amount', nargs=1)
                                                                                                                        @click.argument('asset', nargs=1)
                                                                                                                        @click.argument('price', nargs=1, required=False)
                                                                                                                        @click.option('--account', '-a', help='Sell with this account (defaults to "default_account")')
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 4 hrs to fix
                                                                                                                        beem/cli.py on lines 3328..3334

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 77.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            if export and export != "":
                                                                                                                                with open(export, 'w') as fp:
                                                                                                                                    fp.write(str(t))
                                                                                                                                    fp.write("\n")
                                                                                                                                    fp.write(str(t_pub))
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 4 hrs to fix
                                                                                                                        beem/cli.py on lines 946..954

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 77.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                        @cli.command()
                                                                                                                        @click.argument('amount', nargs=1)
                                                                                                                        @click.argument('asset', nargs=1)
                                                                                                                        @click.argument('price', nargs=1, required=False)
                                                                                                                        @click.option('--account', '-a', help='Buy with this account (defaults to "default_account")')
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 4 hrs to fix
                                                                                                                        beem/cli.py on lines 3377..3383

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 77.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                if next_block_d > 1:
                                                                                                                                    time_diff_est = "%.2f days" % next_block_d
                                                                                                                                elif next_block_h > 1:
                                                                                                                                    time_diff_est = "%.2f hours" % next_block_h
                                                                                                                                elif next_block_min > 1:
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 4 hrs to fix
                                                                                                                        examples/next_witness_block_coundown.py on lines 14..21

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 77.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            if asset == stm.backed_token_symbol:
                                                                                                                                market = Market(base=Asset(stm.token_symbol), quote=Asset(stm.backed_token_symbol), blockchain_instance=stm)
                                                                                                                            else:
                                                                                                                                market = Market(base=Asset(stm.backed_token_symbol), quote=Asset(stm.token_symbol), blockchain_instance=stm)
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 3 hrs to fix
                                                                                                                        beem/cli.py on lines 3392..3395

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 71.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            if asset == stm.backed_token_symbol:
                                                                                                                                market = Market(base=Asset(stm.token_symbol), quote=Asset(stm.backed_token_symbol), blockchain_instance=stm)
                                                                                                                            else:
                                                                                                                                market = Market(base=Asset(stm.backed_token_symbol), quote=Asset(stm.token_symbol), blockchain_instance=stm)
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 3 hrs to fix
                                                                                                                        beem/cli.py on lines 3345..3348

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 71.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                t.add_row([
                                                                                                                                    'Rewards',
                                                                                                                                    str(a.balances['rewards'][0]),
                                                                                                                                    str(a.balances['rewards'][1]),
                                                                                                                                    str(a.balances['rewards'][2]),
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 2 other locations - About 3 hrs to fix
                                                                                                                        beem/cli.py on lines 1596..1600
                                                                                                                        beem/cli.py on lines 1614..1618

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 68.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                t.add_row([
                                                                                                                                    'Available',
                                                                                                                                    str(a.balances['available'][0]),
                                                                                                                                    str(a.balances['available'][1]),
                                                                                                                                    str(a.balances['available'][2]),
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 2 other locations - About 3 hrs to fix
                                                                                                                        beem/cli.py on lines 1602..1606
                                                                                                                        beem/cli.py on lines 1614..1618

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 68.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                t.add_row([
                                                                                                                                    'TOTAL',
                                                                                                                                    str(a.balances['total'][0]),
                                                                                                                                    str(a.balances['total'][1]),
                                                                                                                                    str(a.balances['total'][2]),
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 2 other locations - About 3 hrs to fix
                                                                                                                        beem/cli.py on lines 1596..1600
                                                                                                                        beem/cli.py on lines 1602..1606

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 68.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                if "percent_steem_dollars" in comment:
                                                                                                                                    yaml_prefix += 'percent_steem_dollars: %s\n' %  str(comment["percent_steem_dollars"])
                                                                                                                                elif "percent_hbd" in comment:
                                                                                                                                    yaml_prefix += 'percent_hbd: %s\n' %  str(comment["percent_hbd"])
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 3 hrs to fix
                                                                                                                        beem/utils.py on lines 405..408

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 67.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            while not offline and node[0] != stm.rpc.url and len(node) > 1:
                                                                                                                                node = node[1:] + [node[0]]
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 3 hrs to fix
                                                                                                                        beem/blockchaininstance.py on lines 864..865

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 65.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                if len(sumsum_bids) > i and not show_date:
                                                                                                                                    row.append("%.2f" % sumsum_bids[i])
                                                                                                                                elif not show_date:
                                                                                                                                    row.append([""])
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 3 hrs to fix
                                                                                                                        beem/cli.py on lines 3304..3307

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 64.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                if len(sumsum_asks) > i and not show_date:
                                                                                                                                    row.append("%.2f" % sumsum_asks[i])
                                                                                                                                elif not show_date:
                                                                                                                                    row.append([""])
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 3 hrs to fix
                                                                                                                        beem/cli.py on lines 3316..3319

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 64.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                        for key in sorted(witness_json):
                                                                                                                                            value = witness_json[key]
                                                                                                                                            if key in ["props", "sbd_exchange_rate"]:
                                                                                                                                                value = json.dumps(value, indent=4)
                                                                                                                                            t.add_row([key, value])
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 hrs to fix
                                                                                                                        beem/cli.py on lines 3871..3875

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 61.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            for key in sorted(witness_json):
                                                                                                                                value = witness_json[key]
                                                                                                                                if key in ["props", "sbd_exchange_rate"]:
                                                                                                                                    value = json.dumps(value, indent=4)
                                                                                                                                t.add_row([key, value])
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 hrs to fix
                                                                                                                        beem/cli.py on lines 4868..4872

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 61.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                if asset == stm.backed_token_symbol and len(orderbook["bids"]) > 0:
                                                                                                                                    p = Price(orderbook["bids"][0]["base"], orderbook["bids"][0]["quote"], blockchain_instance=stm).invert()
                                                                                                                                    p_show = p
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 2 other locations - About 2 hrs to fix
                                                                                                                        beem/cli.py on lines 3351..3353
                                                                                                                        beem/cli.py on lines 3354..3356

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 60.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                if asset == stm.token_symbol and len(orderbook["bids"]) > 0:
                                                                                                                                    p = Price(orderbook["bids"][0]["base"], orderbook["bids"][0]["quote"], blockchain_instance=stm).invert()
                                                                                                                                    p_show = p
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 2 other locations - About 2 hrs to fix
                                                                                                                        beem/cli.py on lines 3354..3356
                                                                                                                        beem/cli.py on lines 3400..3402

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 60.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                elif len(orderbook["asks"]) > 0:
                                                                                                                                    p = Price(orderbook["asks"][0]["base"], orderbook["asks"][0]["quote"], blockchain_instance=stm).invert()
                                                                                                                                    p_show = p
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 2 other locations - About 2 hrs to fix
                                                                                                                        beem/cli.py on lines 3351..3353
                                                                                                                        beem/cli.py on lines 3400..3402

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 60.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                if post:
                                                                                                                                    if comment + curation == 0:
                                                                                                                                        message += "post "
                                                                                                                                    elif comment + curation == 1:
                                                                                                                                        message += "post and "
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 hrs to fix
                                                                                                                        beem/cli.py on lines 4577..4583

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 59.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            elif owner is None or active is None or memo is None or posting is None:
                                                                                                                                import_password = click.prompt("Keys were not given - Passphrase is used to create keys\n New Account Passphrase", confirmation_prompt=True, hide_input=True)
                                                                                                                                if not import_password:
                                                                                                                                    print("You cannot chose an empty password")
                                                                                                                                    return
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 hrs to fix
                                                                                                                        beem/cli.py on lines 2057..2060

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 59.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            if export_pub and export_pub != "":
                                                                                                                                pub_json = json.dumps(pub_json, indent=4)
                                                                                                                                with open(export_pub, 'w') as fp:
                                                                                                                                    fp.write(pub_json)
                                                                                                                                print("%s was sucessfully saved." % export_pub)
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 hrs to fix
                                                                                                                        beem/cli.py on lines 941..945

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 59.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                                if create_claimed_account:
                                                                                                                                    tx = stm.create_claimed_account(accountname, creator=acc, owner_key=owner, active_key=active, memo_key=memo, posting_key=posting)
                                                                                                                                else:
                                                                                                                                    tx = stm.create_account(accountname, creator=acc, owner_key=owner, active_key=active, memo_key=memo, posting_key=posting)
                                                                                                                        Severity: Major
                                                                                                                        Found in beem/cli.py and 1 other location - About 2 hrs to fix
                                                                                                                        beem/cli.py on lines 2061..2075

                                                                                                                        Duplicated Code

                                                                                                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                        Tuning

                                                                                                                        This issue has a mass of 59.

                                                                                                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                        Refactorings

                                                                                                                        Further Reading

                                                                                                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                        Open

                                                                                                                            if export_pub and export_pub != "":
                                                                                                                                pub_json = json.dumps(pub_json, indent=4)
                                                                                                                                with open(export_pub, 'w') as fp:
                                                                                                                                    fp.write(pub_json)
                                                                                                                                print("%s was sucessfully saved