holgern/beem

View on GitHub
beem/account.py

Summary

Maintainability
F
1 mo
Test Coverage
B
82%

File account.py has 3323 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
import pytz
import json
from datetime import datetime, timedelta, date, time
import math
Severity: Major
Found in beem/account.py - About 1 wk to fix

    Account has 120 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Account(BlockchainObject):
        """ This class allows to easily access Account data
    
            :param str account: Name of the account
            :param Steem/Hive blockchain_instance: Hive or Steem
    Severity: Major
    Found in beem/account.py - About 2 days to fix

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

          def history(
              self, start=None, stop=None, use_block_num=True,
              only_ops=[], exclude_ops=[], batch_size=1000, raw_output=False
          ):
              """ Returns a generator for individual account transactions. The
      Severity: Minor
      Found in beem/account.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 history_reverse has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring.
      Open

          def history_reverse(
              self, start=None, stop=None, use_block_num=True,
              only_ops=[], exclude_ops=[], batch_size=1000, raw_output=False
          ):
              """ Returns a generator for individual account transactions. The
      Severity: Minor
      Found in beem/account.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 method history. (77)
      Open

          def history(
              self, start=None, stop=None, use_block_num=True,
              only_ops=[], exclude_ops=[], batch_size=1000, raw_output=False
          ):
              """ Returns a generator for individual account transactions. The
      Severity: Minor
      Found in beem/account.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 method history_reverse. (66)
      Open

          def history_reverse(
              self, start=None, stop=None, use_block_num=True,
              only_ops=[], exclude_ops=[], batch_size=1000, raw_output=False
          ):
              """ Returns a generator for individual account transactions. The
      Severity: Minor
      Found in beem/account.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 method get_account_history. (53)
      Open

          def get_account_history(self, index, limit, order=-1, start=None, stop=None, use_block_num=True, only_ops=[], exclude_ops=[], raw_output=False):
              """ Returns a generator for individual account transactions. This call can be used in a
                  ``for`` loop.
      
                  :param int index: first number of transactions to return
      Severity: Minor
      Found in beem/account.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 _get_followers has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
      Open

          def _get_followers(self, direction="follower", last_user="", what="blog", limit=100):
              """ Help function, used in get_followers and get_following
              """
              if not self.blockchain.is_connected():
                  raise OfflineHasNoRPCException("No RPC available in offline mode!")
      Severity: Minor
      Found in beem/account.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 get_account_history has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
      Open

          def get_account_history(self, index, limit, order=-1, start=None, stop=None, use_block_num=True, only_ops=[], exclude_ops=[], raw_output=False):
              """ Returns a generator for individual account transactions. This call can be used in a
                  ``for`` loop.
      
                  :param int index: first number of transactions to return
      Severity: Minor
      Found in beem/account.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 method get_blog. (27)
      Open

          def get_blog(self, start_entry_id=0, limit=100, raw_data=False, short_entries=False, account=None):
              """ Returns the list of blog entries for an account
      
                  :param int start_entry_id: default is 0
                  :param int limit: default is 100
      Severity: Minor
      Found in beem/account.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 estimate_virtual_op_num has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          def estimate_virtual_op_num(self, blocktime, stop_diff=0, max_count=100, min_index=None):
              """ Returns an estimation of an virtual operation index for a given time or blockindex
      
                  :param blocktime: start time or start block index from which account
                      operation should be fetched
      Severity: Minor
      Found in beem/account.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 method _get_followers. (21)
      Open

          def _get_followers(self, direction="follower", last_user="", what="blog", limit=100):
              """ Help function, used in get_followers and get_following
              """
              if not self.blockchain.is_connected():
                  raise OfflineHasNoRPCException("No RPC available in offline mode!")
      Severity: Minor
      Found in beem/account.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 get_blog has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

          def get_blog(self, start_entry_id=0, limit=100, raw_data=False, short_entries=False, account=None):
              """ Returns the list of blog entries for an account
      
                  :param int start_entry_id: default is 0
                  :param int limit: default is 100
      Severity: Minor
      Found in beem/account.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 method reply_history. (20)
      Open

          def reply_history(self, limit=None, start_author=None,
                            start_permlink=None, account=None):
              """ Stream the replies to an account in reverse time order.
      
                  .. note:: RPC nodes keep a limited history of entries for the
      Severity: Minor
      Found in beem/account.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 reply_history has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

          def reply_history(self, limit=None, start_author=None,
                            start_permlink=None, account=None):
              """ Stream the replies to an account in reverse time order.
      
                  .. note:: RPC nodes keep a limited history of entries for the
      Severity: Minor
      Found in beem/account.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

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

          def blog_history(self, limit=None, start=-1, reblogs=True, account=None):
              """ Stream the blog entries done by an account in reverse time order.
      
                  .. note:: RPC nodes keep a limited history of entries for the
                            user blog. Older blog posts of an account may not be available
      Severity: Minor
      Found in beem/account.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 method json. (18)
      Open

          def json(self):
              output = self.copy()
              parse_int = [
                  "sbd_seconds", "savings_sbd_seconds", "hbd_seconds", "savings_hbd_seconds",
              ]
      Severity: Minor
      Found in beem/account.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 method feed_history. (18)
      Open

          def feed_history(self, limit=None, start_author=None, start_permlink=None,
                           account=None):
              """ Stream the feed entries of an account in reverse time order.
      
                  .. note:: RPC nodes keep a limited history of entries for the
      Severity: Minor
      Found in beem/account.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 method estimate_virtual_op_num. (18)
      Open

          def estimate_virtual_op_num(self, blocktime, stop_diff=0, max_count=100, min_index=None):
              """ Returns an estimation of an virtual operation index for a given time or blockindex
      
                  :param blocktime: start time or start block index from which account
                      operation should be fetched
      Severity: Minor
      Found in beem/account.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 json has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
      Open

          def json(self):
              output = self.copy()
              parse_int = [
                  "sbd_seconds", "savings_sbd_seconds", "hbd_seconds", "savings_hbd_seconds",
              ]
      Severity: Minor
      Found in beem/account.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 method blog_history. (17)
      Open

          def blog_history(self, limit=None, start=-1, reblogs=True, account=None):
              """ Stream the blog entries done by an account in reverse time order.
      
                  .. note:: RPC nodes keep a limited history of entries for the
                            user blog. Older blog posts of an account may not be available
      Severity: Minor
      Found in beem/account.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 method disallow. (17)
      Open

          def disallow(
              self, foreign, permission="posting",
              account=None, threshold=None, **kwargs
          ):
              """ Remove additional access to an account by some other public
      Severity: Minor
      Found in beem/account.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 method print_info. (17)
      Open

          def print_info(self, force_refresh=False, return_str=False, use_table=False, **kwargs):
              """ Prints import information about the account
              """
              if force_refresh:
                  self.refresh()
      Severity: Minor
      Found in beem/account.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 _get_account_history has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
      Open

          def _get_account_history(self, account=None, start=-1, limit=1, operation_filter_low=None, operation_filter_high=None):
              if account is None:
                  account = self["name"]
              account = extract_account_name(account)
              if limit < 1:
      Severity: Minor
      Found in beem/account.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 feed_history has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
      Open

          def feed_history(self, limit=None, start_author=None, start_permlink=None,
                           account=None):
              """ Stream the feed entries of an account in reverse time order.
      
                  .. note:: RPC nodes keep a limited history of entries for the
      Severity: Minor
      Found in beem/account.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

      Consider simplifying this complex logical expression.
      Open

                  if start and isinstance(start, (datetime, date, time)):
                      timediff = start - formatTimeString(event["timestamp"])
                      if timediff.total_seconds() * float(order) > 0:
                          continue
                  elif start is not None and use_block_num and order == 1 and event['block'] < start:
      Severity: Critical
      Found in beem/account.py - About 3 hrs to fix

        Consider simplifying this complex logical expression.
        Open

                    if stop is not None and isinstance(stop, (datetime, date, time)):
                        timediff = stop - formatTimeString(event["timestamp"])
                        if timediff.total_seconds() * float(order) < 0:
                            return
                    elif stop is not None and use_block_num and order == 1 and event['block'] > stop:
        Severity: Critical
        Found in beem/account.py - About 3 hrs to fix

          Cyclomatic complexity is too high in method comment_history. (15)
          Open

              def comment_history(self, limit=None, start_permlink=None,
                                  account=None):
                  """ Stream the comments done by an account in reverse time order.
          
                      .. note:: RPC nodes keep a limited history of user comments for the
          Severity: Minor
          Found in beem/account.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 _get_operation_filter has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
          Open

              def _get_operation_filter(self, only_ops=[], exclude_ops=[]):
                  from beembase.operationids import operations
                  operation_filter_low = 0
                  operation_filter_high = 0
                  if len(only_ops) == 0 and len(exclude_ops) == 0:
          Severity: Minor
          Found in beem/account.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 method _get_account_history. (13)
          Open

              def _get_account_history(self, account=None, start=-1, limit=1, operation_filter_low=None, operation_filter_high=None):
                  if account is None:
                      account = self["name"]
                  account = extract_account_name(account)
                  if limit < 1:
          Severity: Minor
          Found in beem/account.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 method _parse_json_data. (13)
          Open

              def _parse_json_data(self, account):
                  parse_int = [
                      "sbd_seconds", "savings_sbd_seconds", "average_bandwidth", "lifetime_bandwidth",
                      "lifetime_market_bandwidth", "reputation", "withdrawn", "to_withdraw",
                      "hbd_seconds", "savings_hbd_seconds",
          Severity: Minor
          Found in beem/account.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 comment_history has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
          Open

              def comment_history(self, limit=None, start_permlink=None,
                                  account=None):
                  """ Stream the comments done by an account in reverse time order.
          
                      .. note:: RPC nodes keep a limited history of user comments for the
          Severity: Minor
          Found in beem/account.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 print_info has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
          Open

              def print_info(self, force_refresh=False, return_str=False, use_table=False, **kwargs):
                  """ Prints import information about the account
                  """
                  if force_refresh:
                      self.refresh()
          Severity: Minor
          Found in beem/account.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 method get_account_votes. (12)
          Open

              def get_account_votes(self, account=None, start_author="", start_permlink="", limit=1000, start_date=None):
                  """ Returns all votes that the account has done
                      
                      :rtype: list
          
          
          Severity: Minor
          Found in beem/account.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 get_account_votes has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

              def get_account_votes(self, account=None, start_author="", start_permlink="", limit=1000, start_date=None):
                  """ Returns all votes that the account has done
                      
                      :rtype: list
          
          
          Severity: Minor
          Found in beem/account.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 method allow. (11)
          Open

              def allow(
                  self, foreign, weight=None, permission="posting",
                  account=None, threshold=None, **kwargs
              ):
                  """ Give additional access to an account by some other public
          Severity: Minor
          Found in beem/account.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 method get_notifications. (11)
          Open

              def get_notifications(self, only_unread=True, limit=100, raw_data=False, account=None):
                  """ Returns account notifications
          
                      :param bool only_unread: When True, only unread notfications are shown
                      :param int limit: When set, the number of shown notifications is limited (max limit = 100)
          Severity: Minor
          Found in beem/account.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 method get_balance. (10)
          Open

              def get_balance(self, balances, symbol):
                  """ Obtain the balance of a specific Asset. This call returns instances of
                      :class:`beem.amount.Amount`. Available balance types:
          
                      * "available"
          Severity: Minor
          Found in beem/account.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 method get_bandwidth. (10)
          Open

              def get_bandwidth(self):
                  """ Returns used and allocated bandwidth
          
                      :rtype: dictionary
          
          
          Severity: Minor
          Found in beem/account.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 method refresh. (10)
          Open

              def refresh(self):
                  """ Refresh/Obtain an account's data from the API server
                  """
                  if not self.blockchain.is_connected():
                      return
          Severity: Minor
          Found in beem/account.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 method _get_operation_filter. (10)
          Open

              def _get_operation_filter(self, only_ops=[], exclude_ops=[]):
                  from beembase.operationids import operations
                  operation_filter_low = 0
                  operation_filter_high = 0
                  if len(only_ops) == 0 and len(exclude_ops) == 0:
          Severity: Minor
          Found in beem/account.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 method claim_reward_balance. (9)
          Open

              def claim_reward_balance(self,
                                       reward_steem=0,
                                       reward_sbd=0,
                                       reward_hive=0,
                                       reward_hbd=0,                             
          Severity: Minor
          Found in beem/account.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 method print_summarize_table. (9)
          Open

              def print_summarize_table(self, tag_type="Follower", return_str=False, **kwargs):
                  t = PrettyTable([
                      "Key", "Value"
                  ])
                  t.align = "r"
          Severity: Minor
          Found in beem/account.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 method __init__. (9)
          Open

              def __init__(self, name_list, batch_limit=100, lazy=False, full=True, blockchain_instance=None, **kwargs):
                  
                  if blockchain_instance is None:
                      if kwargs.get("steem_instance"):
                          blockchain_instance = kwargs["steem_instance"]
          Severity: Minor
          Found in beem/account.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 method get_follow_list. (9)
          Open

              def get_follow_list(self, follow_type, starting_account=None, limit=100, raw_name_list=True):
                  """ Returns the follow list for the specified follow_type (Only HIVE with HF >= 24)
          
                      :param list follow_type: follow_type can be `blacklisted`, `follow_blacklist` `muted`, or `follow_muted`
                  """
          Severity: Minor
          Found in beem/account.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 method virtual_op_count. (9)
          Open

              def virtual_op_count(self, until=None):
                  """ Returns the number of individual account transactions
          
                      :rtype: list
                  """
          Severity: Minor
          Found in beem/account.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 class Accounts. (9)
          Open

          class Accounts(AccountsObject):
              """ Obtain a list of accounts
          
                  :param list name_list: list of accounts to fetch
                  :param int batch_limit: (optional) maximum number of accounts
          Severity: Minor
          Found in beem/account.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 method get_voting_power. (8)
          Open

              def get_voting_power(self, with_regeneration=True):
                  """ Returns the account voting power in the range of 0-100%
          
                      :param bool with_regeneration: When True, voting power regeneration is
                          included into the result (default True)
          Severity: Minor
          Found in beem/account.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 _parse_json_data has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
          Open

              def _parse_json_data(self, account):
                  parse_int = [
                      "sbd_seconds", "savings_sbd_seconds", "average_bandwidth", "lifetime_bandwidth",
                      "lifetime_market_bandwidth", "reputation", "withdrawn", "to_withdraw",
                      "hbd_seconds", "savings_hbd_seconds",
          Severity: Minor
          Found in beem/account.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 method get_conversion_requests. (7)
          Open

              def get_conversion_requests(self, account=None):
                  """ Returns a list of SBD conversion request
          
                      :param str account: When set, a different account is used for the request (Default is object account name)
          
          
          Severity: Minor
          Found in beem/account.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 method reward_balances. (7)
          Open

              @property
              def reward_balances(self):
                  if "reward_steem_balance" in self and "reward_sbd_balance" in self:
                      amount_list = ["reward_steem_balance", "reward_sbd_balance", "reward_vesting_balance"]
                  elif "reward_hive_balance" in self and "reward_hbd_balance" in self:
          Severity: Minor
          Found in beem/account.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 method get_vote_pct_for_vote_value. (7)
          Open

              def get_vote_pct_for_vote_value(self, token_units, post_rshares=0, voting_power=None, token_power=None, not_broadcasted_vote=True):
                  """ Returns the voting percentage needed to have a vote worth a given number of Hive/Steem token units
          
                      If the returned number is bigger than 10000 or smaller than -10000,
                      the given SBD value is too high for that account
          Severity: Minor
          Found in beem/account.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 method transfer_to_vesting. (7)
          Open

              def transfer_to_vesting(self, amount, to=None, account=None, skip_account_check=False, **kwargs):
                  """ Vest STEEM
          
                      :param float amount: Amount to transfer
                      :param str to: Recipient (optional) if not set equal to account
          Severity: Minor
          Found in beem/account.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 method get_effective_vesting_shares. (7)
          Open

              def get_effective_vesting_shares(self):
                  """Returns the effective vesting shares"""
                  vesting_shares = int(self["vesting_shares"])
                  if "delegated_vesting_shares" in self and "received_vesting_shares" in self:
                      vesting_shares = vesting_shares - int(self["delegated_vesting_shares"]) + int(self["received_vesting_shares"])
          Severity: Minor
          Found in beem/account.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 method get_reputation. (6)
          Open

              def get_reputation(self):
                  """ Returns the account reputation in the (steemit) normalized form
                  """
                  if not self.blockchain.is_connected():
                      return None
          Severity: Minor
          Found in beem/account.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 class Account. (6)
          Open

          class Account(BlockchainObject):
              """ This class allows to easily access Account data
          
                  :param str account: Name of the account
                  :param Steem/Hive blockchain_instance: Hive or Steem
          Severity: Minor
          Found in beem/account.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 method get_downvoting_power. (6)
          Open

              def get_downvoting_power(self, with_regeneration=True):
                  """ Returns the account downvoting power in the range of 0-100%
          
                      :param bool with_regeneration: When True, downvoting power regeneration is
                          included into the result (default True)
          Severity: Minor
          Found in beem/account.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 method get_savings_withdrawals. (6)
          Open

              def get_savings_withdrawals(self, direction="from", account=None):
                  """ Returns the list of savings withdrawls for an account.
          
                      :param str account: When set, a different account is used for the request (Default is object account name)
                      :param str direction: Can be either from or to (only non appbase nodes)
          Severity: Minor
          Found in beem/account.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 method __init__. (6)
          Open

              def __init__(
                  self,
                  account,
                  full=True,
                  lazy=False,
          Severity: Minor
          Found in beem/account.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 method get_vesting_delegations. (6)
          Open

              def get_vesting_delegations(self, start_account="", limit=100, account=None):
                  """ Returns the vesting delegations by an account.
          
                      :param str account: When set, a different account is used for the request (Default is object account name)
                      :param str start_account: delegatee to start with, leave empty to start from the first by name
          Severity: Minor
          Found in beem/account.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 method mark_notifications_as_read. (6)
          Open

              def mark_notifications_as_read(self, last_read=None, account=None):
                  """ Broadcast a mark all notification as read custom_json
          
                      :param str last_read: When set, this datestring is used to set the mark as read date
                      :param str account: (optional) the account to broadcast the custom_json
          Severity: Minor
          Found in beem/account.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 method verify_account_authority. (6)
          Open

              def verify_account_authority(self, keys, account=None):
                  """ Returns true if the signers have enough authority to authorize an account.
          
                      :param list keys: public key
                      :param str account: When set, a different account is used for the request (Default is object account name)
          Severity: Minor
          Found in beem/account.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 method recurring_transfer. (6)
          Open

              def recurring_transfer(self, to, amount, asset, recurrence, executions, memo="", skip_account_check=False, account=None, **kwargs):
                  """ Transfer an asset to another account.
          
                      :param str to: Recipient
                      :param float amount: Amount to transfer in each occurence, must have 3 decimal points
          Severity: Minor
          Found in beem/account.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 class AccountsObject. (6)
          Open

          class AccountsObject(list):
              def printAsTable(self):
                  t = PrettyTable(["Name"])
                  t.align = "l"
                  for acc in self:
          Severity: Minor
          Found in beem/account.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 method follow. (6)
          Open

              def follow(self, other, what=["blog"], account=None):
                  """ Follow/Unfollow/Mute/Unmute another account's blog
          
                      .. note:: what can be one of the following on HIVE:
                      blog, ignore, blacklist, unblacklist, follow_blacklist,
          Severity: Minor
          Found in beem/account.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 method transfer. (6)
          Open

              def transfer(self, to, amount, asset, memo="", skip_account_check=False, account=None, **kwargs):
                  """ Transfer an asset to another account.
          
                      :param str to: Recipient
                      :param float amount: Amount to transfer
          Severity: Minor
          Found in beem/account.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 virtual_op_count has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
          Open

              def virtual_op_count(self, until=None):
                  """ Returns the number of individual account transactions
          
                      :rtype: list
                  """
          Severity: Minor
          Found in beem/account.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 get_voting_power has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
          Open

              def get_voting_power(self, with_regeneration=True):
                  """ Returns the account voting power in the range of 0-100%
          
                      :param bool with_regeneration: When True, voting power regeneration is
                          included into the result (default True)
          Severity: Minor
          Found in beem/account.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 get_bandwidth has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

              def get_bandwidth(self):
                  """ Returns used and allocated bandwidth
          
                      :rtype: dictionary
          
          
          Severity: Minor
          Found in beem/account.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 allow has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

              def allow(
                  self, foreign, weight=None, permission="posting",
                  account=None, threshold=None, **kwargs
              ):
                  """ Give additional access to an account by some other public
          Severity: Minor
          Found in beem/account.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 print_summarize_table has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

              def print_summarize_table(self, tag_type="Follower", return_str=False, **kwargs):
                  t = PrettyTable([
                      "Key", "Value"
                  ])
                  t.align = "r"
          Severity: Minor
          Found in beem/account.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 get_reputation has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def get_reputation(self):
                  """ Returns the account reputation in the (steemit) normalized form
                  """
                  if not self.blockchain.is_connected():
                      return None
          Severity: Minor
          Found in beem/account.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 get_follow_list has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def get_follow_list(self, follow_type, starting_account=None, limit=100, raw_name_list=True):
                  """ Returns the follow list for the specified follow_type (Only HIVE with HF >= 24)
          
                      :param list follow_type: follow_type can be `blacklisted`, `follow_blacklist` `muted`, or `follow_muted`
                  """
          Severity: Minor
          Found in beem/account.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 disallow has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def disallow(
                  self, foreign, permission="posting",
                  account=None, threshold=None, **kwargs
              ):
                  """ Remove additional access to an account by some other public
          Severity: Minor
          Found in beem/account.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 claim_reward_balance has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def claim_reward_balance(self,
                                       reward_steem=0,
                                       reward_sbd=0,
                                       reward_hive=0,
                                       reward_hbd=0,                             
          Severity: Minor
          Found in beem/account.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 get_balance has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def get_balance(self, balances, symbol):
                  """ Obtain the balance of a specific Asset. This call returns instances of
                      :class:`beem.amount.Amount`. Available balance types:
          
                      * "available"
          Severity: Minor
          Found in beem/account.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 recurring_transfer has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def recurring_transfer(self, to, amount, asset, recurrence, executions, memo="", skip_account_check=False, account=None, **kwargs):
          Severity: Major
          Found in beem/account.py - About 1 hr to fix

            Function get_account_history has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def get_account_history(self, index, limit, order=-1, start=None, stop=None, use_block_num=True, only_ops=[], exclude_ops=[], raw_output=False):
            Severity: Major
            Found in beem/account.py - About 1 hr to fix

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

                  def __init__(self, name_list, batch_limit=100, lazy=False, full=True, blockchain_instance=None, **kwargs):
                      
                      if blockchain_instance is None:
                          if kwargs.get("steem_instance"):
                              blockchain_instance = kwargs["steem_instance"]
              Severity: Minor
              Found in beem/account.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 refresh has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  def refresh(self):
                      """ Refresh/Obtain an account's data from the API server
                      """
                      if not self.blockchain.is_connected():
                          return
              Severity: Minor
              Found in beem/account.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 get_notifications has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  def get_notifications(self, only_unread=True, limit=100, raw_data=False, account=None):
                      """ Returns account notifications
              
                          :param bool only_unread: When True, only unread notfications are shown
                          :param int limit: When set, the number of shown notifications is limited (max limit = 100)
              Severity: Minor
              Found in beem/account.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 start is not None and isinstance(start, int) and start < 0 and not use_block_num:
                          start += first
                      elif start is not None and isinstance(start, int) and not use_block_num:
                          first = start
                      elif start is not None and first > batch_size:
              Severity: Major
              Found in beem/account.py - About 1 hr to fix

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

                    def claim_reward_balance(self,
                Severity: Major
                Found in beem/account.py - About 50 mins to fix

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

                      def transfer(self, to, amount, asset, memo="", skip_account_check=False, account=None, **kwargs):
                  Severity: Major
                  Found in beem/account.py - About 50 mins to fix

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

                        def history_reverse(
                    Severity: Major
                    Found in beem/account.py - About 50 mins to fix

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

                          def transfer_from_savings(self,
                      Severity: Major
                      Found in beem/account.py - About 50 mins to fix

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

                            def history(
                        Severity: Major
                        Found in beem/account.py - About 50 mins to fix

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

                              def __init__(self, name_list, batch_limit=100, lazy=False, full=True, blockchain_instance=None, **kwargs):
                          Severity: Minor
                          Found in beem/account.py - About 45 mins to fix

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

                                def allow(
                            Severity: Minor
                            Found in beem/account.py - About 45 mins to fix

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

                                  def transfer_to_savings(self, amount, asset, memo, to=None, account=None, **kwargs):
                              Severity: Minor
                              Found in beem/account.py - About 45 mins to fix

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

                                    def get_vote_pct_for_vote_value(self, token_units, post_rshares=0, voting_power=None, token_power=None, not_broadcasted_vote=True):
                                        """ Returns the voting percentage needed to have a vote worth a given number of Hive/Steem token units
                                
                                            If the returned number is bigger than 10000 or smaller than -10000,
                                            the given SBD value is too high for that account
                                Severity: Minor
                                Found in beem/account.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 get_downvoting_power has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def get_downvoting_power(self, with_regeneration=True):
                                        """ Returns the account downvoting power in the range of 0-100%
                                
                                            :param bool with_regeneration: When True, downvoting power regeneration is
                                                included into the result (default True)
                                Severity: Minor
                                Found in beem/account.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

                                Consider simplifying this complex logical expression.
                                Open

                                                if stop is not None and isinstance(stop, (datetime, date, time)):
                                                    timediff = stop - formatTimeString(timestamp)
                                                    if timediff.total_seconds() > 0:
                                                        first = 0
                                                        return
                                Severity: Major
                                Found in beem/account.py - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                  if stop is not None and isinstance(stop, (datetime, date, time)):
                                                      timediff = stop - formatTimeString(timestamp)
                                                      if timediff.total_seconds() < 0:
                                                          first = max_index + _limit
                                                          return
                                  Severity: Major
                                  Found in beem/account.py - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                    if start is not None and isinstance(start, (datetime, date, time)):
                                                        timediff = start - formatTimeString(timestamp)
                                                        if timediff.total_seconds() > 0:
                                                            continue
                                                    elif start is not None and use_block_num and block_num < start:
                                    Severity: Major
                                    Found in beem/account.py - About 40 mins to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                      if start is not None and isinstance(start, (datetime, date, time)):
                                                          timediff = start - formatTimeString(timestamp)
                                                          if timediff.total_seconds() < 0:
                                                              continue
                                                      elif start is not None and use_block_num and block_num > start:
                                      Severity: Major
                                      Found in beem/account.py - About 40 mins to fix

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

                                            def __init__(
                                        Severity: Minor
                                        Found in beem/account.py - About 35 mins to fix

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

                                              def get_vote_pct_for_vote_value(self, token_units, post_rshares=0, voting_power=None, token_power=None, not_broadcasted_vote=True):
                                          Severity: Minor
                                          Found in beem/account.py - About 35 mins to fix

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

                                                def get_blog(self, start_entry_id=0, limit=100, raw_data=False, short_entries=False, account=None):
                                            Severity: Minor
                                            Found in beem/account.py - About 35 mins to fix

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

                                                  def get_account_posts(self, sort="feed", limit=20, account=None, observer=None, raw_data=False):
                                              Severity: Minor
                                              Found in beem/account.py - About 35 mins to fix

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

                                                    def disallow(
                                                Severity: Minor
                                                Found in beem/account.py - About 35 mins to fix

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

                                                      def set_withdraw_vesting_route(self,
                                                  Severity: Minor
                                                  Found in beem/account.py - About 35 mins to fix

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

                                                        def get_voting_value_SBD(self, post_rshares=0, voting_weight=100, voting_power=None, steem_power=None, not_broadcasted_vote=True):
                                                    Severity: Minor
                                                    Found in beem/account.py - About 35 mins to fix

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

                                                          def get_feed(self, start_entry_id=0, limit=100, raw_data=False, short_entries=False, account=None):
                                                      Severity: Minor
                                                      Found in beem/account.py - About 35 mins to fix

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

                                                            def get_account_votes(self, account=None, start_author="", start_permlink="", limit=1000, start_date=None):
                                                        Severity: Minor
                                                        Found in beem/account.py - About 35 mins to fix

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

                                                              def get_voting_value(self, post_rshares=0, voting_weight=100, voting_power=None, token_power=None, not_broadcasted_vote=True):
                                                          Severity: Minor
                                                          Found in beem/account.py - About 35 mins to fix

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

                                                                def _get_account_history(self, account=None, start=-1, limit=1, operation_filter_low=None, operation_filter_high=None):
                                                            Severity: Minor
                                                            Found in beem/account.py - About 35 mins to fix

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

                                                                  def get_vote_pct_for_SBD(self, sbd, post_rshares=0, voting_power=None, steem_power=None, not_broadcasted_vote=True):
                                                              Severity: Minor
                                                              Found in beem/account.py - About 35 mins to fix

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

                                                                    def transfer_to_vesting(self, amount, to=None, account=None, skip_account_check=False, **kwargs):
                                                                Severity: Minor
                                                                Found in beem/account.py - About 35 mins to fix

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

                                                                      def transfer_from_savings(self,
                                                                                                amount,
                                                                                                asset,
                                                                                                memo,
                                                                                                request_id=None,
                                                                  Severity: Minor
                                                                  Found in beem/account.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 0
                                                                  Severity: Major
                                                                  Found in beem/account.py - About 30 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                                        return []
                                                                    Severity: Major
                                                                    Found in beem/account.py - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

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

                                                                        Avoid too many return statements within this function.
                                                                        Open

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

                                                                          Avoid too many return statements within this function.
                                                                          Open

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

                                                                            Avoid too many return statements within this function.
                                                                            Open

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

                                                                              Avoid too many return statements within this function.
                                                                              Open

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

                                                                                Avoid too many return statements within this function.
                                                                                Open

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

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

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

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

                                                                                        def get_conversion_requests(self, account=None):
                                                                                            """ Returns a list of SBD conversion request
                                                                                    
                                                                                                :param str account: When set, a different account is used for the request (Default is object account name)
                                                                                    
                                                                                    
                                                                                    Severity: Minor
                                                                                    Found in beem/account.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 get_follow_count has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def get_follow_count(self, account=None):
                                                                                            """ get_follow_count """
                                                                                            if account is None:
                                                                                                account = self["name"]
                                                                                            account = extract_account_name(account)
                                                                                    Severity: Minor
                                                                                    Found in beem/account.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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def __init__(
                                                                                            self,
                                                                                            account,
                                                                                            full=True,
                                                                                            lazy=False,
                                                                                    Severity: Minor
                                                                                    Found in beem/account.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 reward_balances has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def reward_balances(self):
                                                                                            if "reward_steem_balance" in self and "reward_sbd_balance" in self:
                                                                                                amount_list = ["reward_steem_balance", "reward_sbd_balance", "reward_vesting_balance"]
                                                                                            elif "reward_hive_balance" in self and "reward_hbd_balance" in self:
                                                                                                amount_list = ["reward_hive_balance", "reward_hbd_balance", "reward_vesting_balance"]
                                                                                    Severity: Minor
                                                                                    Found in beem/account.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 get_blog_authors has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def get_blog_authors(self, account=None):
                                                                                            """ Returns a list of authors that have had their content reblogged on a given blog account
                                                                                    
                                                                                                :param str account: When set, a different account name is used (Default is object account name)
                                                                                    
                                                                                    
                                                                                    Severity: Minor
                                                                                    Found in beem/account.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 mark_notifications_as_read has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def mark_notifications_as_read(self, last_read=None, account=None):
                                                                                            """ Broadcast a mark all notification as read custom_json
                                                                                    
                                                                                                :param str last_read: When set, this datestring is used to set the mark as read date
                                                                                                :param str account: (optional) the account to broadcast the custom_json
                                                                                    Severity: Minor
                                                                                    Found in beem/account.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 available_balances has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def available_balances(self):
                                                                                            """ List balances of an account. This call returns instances of
                                                                                                :class:`beem.amount.Amount`.
                                                                                            """
                                                                                            if "sbd_balance" in self:
                                                                                    Severity: Minor
                                                                                    Found in beem/account.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 verify_account_authority has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def verify_account_authority(self, keys, account=None):
                                                                                            """ Returns true if the signers have enough authority to authorize an account.
                                                                                    
                                                                                                :param list keys: public key
                                                                                                :param str account: When set, a different account is used for the request (Default is object account name)
                                                                                    Severity: Minor
                                                                                    Found in beem/account.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 saving_balances has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                    Open

                                                                                        def saving_balances(self):
                                                                                            savings_amount = []
                                                                                            if "savings_sbd_balance" in self:
                                                                                                amount_list = ["savings_balance", "savings_sbd_balance"]
                                                                                            elif "savings_hbd_balance" in self:
                                                                                    Severity: Minor
                                                                                    Found in beem/account.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

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

                                                                                        def feed_history(self, limit=None, start_author=None, start_permlink=None,
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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 24 to the 15 allowed.
                                                                                    Open

                                                                                        def comment_history(self, limit=None, start_permlink=None,
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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 estimate_virtual_op_num(self, blocktime, stop_diff=0, max_count=100, min_index=None):
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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 106 to the 15 allowed.
                                                                                    Open

                                                                                        def history_reverse(
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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 121 to the 15 allowed.
                                                                                    Open

                                                                                        def history(
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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

                                                                                    Method "history_reverse" has 8 parameters, which is greater than the 7 authorized.
                                                                                    Open

                                                                                            self, start=None, stop=None, use_block_num=True,
                                                                                            only_ops=[], exclude_ops=[], batch_size=1000, raw_output=False
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 47 to the 15 allowed.
                                                                                    Open

                                                                                        def _get_followers(self, direction="follower", last_user="", what="blog", limit=100):
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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 _get_operation_filter(self, only_ops=[], exclude_ops=[]):
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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

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

                                                                                            self, start=None, stop=None, use_block_num=True,
                                                                                            only_ops=[], exclude_ops=[], batch_size=1000, raw_output=False
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 21 to the 15 allowed.
                                                                                    Open

                                                                                        def get_account_votes(self, account=None, start_author="", start_permlink="", limit=1000, start_date=None):
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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 52 to the 15 allowed.
                                                                                    Open

                                                                                        def get_account_history(self, index, limit, order=-1, start=None, stop=None, use_block_num=True, only_ops=[], exclude_ops=[], raw_output=False):
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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 21 to the 15 allowed.
                                                                                    Open

                                                                                        def print_info(self, force_refresh=False, return_str=False, use_table=False, **kwargs):
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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

                                                                                    Method "transfer_from_savings" has 8 parameters, which is greater than the 7 authorized.
                                                                                    Open

                                                                                        def transfer_from_savings(self,
                                                                                                                  amount,
                                                                                                                  asset,
                                                                                                                  memo,
                                                                                                                  request_id=None,
                                                                                    Severity: Major
                                                                                    Found in beem/account.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):
                                                                                        ...
                                                                                    

                                                                                    Method "recurring_transfer" has 10 parameters, which is greater than the 7 authorized.
                                                                                    Open

                                                                                        def recurring_transfer(self, to, amount, asset, recurrence, executions, memo="", skip_account_check=False, account=None, **kwargs):
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 json(self):
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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

                                                                                    Method "claim_reward_balance" has 8 parameters, which is greater than the 7 authorized.
                                                                                    Open

                                                                                        def claim_reward_balance(self,
                                                                                                                 reward_steem=0,
                                                                                                                 reward_sbd=0,
                                                                                                                 reward_hive=0,
                                                                                                                 reward_hbd=0,                             
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 19 to the 15 allowed.
                                                                                    Open

                                                                                        def _parse_json_data(self, account):
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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 reply_history(self, limit=None, start_author=None,
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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

                                                                                    Method "get_account_history" has 10 parameters, which is greater than the 7 authorized.
                                                                                    Open

                                                                                        def get_account_history(self, index, limit, order=-1, start=None, stop=None, use_block_num=True, only_ops=[], exclude_ops=[], raw_output=False):
                                                                                    Severity: Major
                                                                                    Found in beem/account.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):
                                                                                        ...
                                                                                    

                                                                                    Method "transfer" has 8 parameters, which is greater than the 7 authorized.
                                                                                    Open

                                                                                        def transfer(self, to, amount, asset, memo="", skip_account_check=False, account=None, **kwargs):
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 get_blog(self, start_entry_id=0, limit=100, raw_data=False, short_entries=False, account=None):
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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 25 to the 15 allowed.
                                                                                    Open

                                                                                        def _get_account_history(self, account=None, start=-1, limit=1, operation_filter_low=None, operation_filter_high=None):
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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 28 to the 15 allowed.
                                                                                    Open

                                                                                        def blog_history(self, limit=None, start=-1, reblogs=True, account=None):
                                                                                    Severity: Critical
                                                                                    Found in beem/account.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 "2539" or change one of the implementations.
                                                                                    Open

                                                                                                        continue
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "2154" or change one of the implementations.
                                                                                    Open

                                                                                                    return
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "2539" or change one of the implementations.
                                                                                    Open

                                                                                                        continue
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "2356" or change one of the implementations.
                                                                                    Open

                                                                                                        continue
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "28" or change one of the implementations.
                                                                                    Open

                                                                                            return account["name"]
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "2142" or change one of the implementations.
                                                                                    Open

                                                                                                    continue
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "2356" or change one of the implementations.
                                                                                    Open

                                                                                                        continue
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "2142" or change one of the implementations.
                                                                                    Open

                                                                                                    continue
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 remove or fill this block of code.
                                                                                    Open

                                                                                                pass
                                                                                    Severity: Major
                                                                                    Found in beem/account.py by sonar-python

                                                                                    Most of the time a block of code is empty when a piece of code is really missing. So such empty block must be either filled or removed.

                                                                                    Noncompliant Code Example

                                                                                    for i in range(3):
                                                                                        pass
                                                                                    

                                                                                    Exceptions

                                                                                    When a block contains a comment, this block is not considered to be empty.

                                                                                    Either merge this branch with the identical one on line "2142" or change one of the implementations.
                                                                                    Open

                                                                                                    continue
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "2367" or change one of the implementations.
                                                                                    Open

                                                                                                        return
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "2388" or change one of the implementations.
                                                                                    Open

                                                                                                        break
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "637" or change one of the implementations.
                                                                                    Open

                                                                                                token_units = Amount(token_units, blockchain_instance=self.blockchain)
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "2154" or change one of the implementations.
                                                                                    Open

                                                                                                    return
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "2154" or change one of the implementations.
                                                                                    Open

                                                                                                    return
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 "2550" or change one of the implementations.
                                                                                    Open

                                                                                                        first = 0
                                                                                                        return
                                                                                    Severity: Major
                                                                                    Found in beem/account.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
                                                                                    

                                                                                    Merge this if statement with the enclosing one.
                                                                                    Open

                                                                                                if not isinstance(limit, integer_types) or limit <= 0:
                                                                                    Severity: Major
                                                                                    Found in beem/account.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:
                                                                                        # ...
                                                                                    

                                                                                    Remove this commented out code.
                                                                                    Open

                                                                                            # if not isinstance(witnesses, (list, set, tuple)):
                                                                                    Severity: Major
                                                                                    Found in beem/account.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"

                                                                                    Remove this commented out code.
                                                                                    Open

                                                                                            # for witness in witnesses:
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 p in output:
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 isinstance(limit, integer_types) or limit <= 0:
                                                                                    Severity: Major
                                                                                    Found in beem/account.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:
                                                                                        # ...
                                                                                    

                                                                                    Remove this commented out code.
                                                                                    Open

                                                                                            # print("bandwidth percent used: " + str(100 * used_bandwidth / allocated_bandwidth))
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 start_index + stop < _limit:
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 isinstance(limit, integer_types) or limit <= 0:
                                                                                    Severity: Major
                                                                                    Found in beem/account.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 isinstance(limit, integer_types) or limit <= 0:
                                                                                    Severity: Major
                                                                                    Found in beem/account.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

                                                                                        def get_recovery_request(self, account=None):
                                                                                            """ Returns the recovery request for an account
                                                                                    
                                                                                                :param str account: When set, a different account is used for the request (Default is object account name)
                                                                                    
                                                                                    
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 day to fix
                                                                                    beem/account.py on lines 1421..1450

                                                                                    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 129.

                                                                                    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

                                                                                        def get_owner_history(self, account=None):
                                                                                            """ Returns the owner history of an account.
                                                                                    
                                                                                                :param str account: When set, a different account is used for the request (Default is object account name)
                                                                                    
                                                                                    
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 day to fix
                                                                                    beem/account.py on lines 1585..1614

                                                                                    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 129.

                                                                                    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 "sbd_last_interest_payment" in self:
                                                                                                last_payment = (self["sbd_last_interest_payment"])
                                                                                                next_payment = last_payment + timedelta(days=30)
                                                                                                interest_rate = self.blockchain.get_dynamic_global_properties()[
                                                                                                    "sbd_interest_rate"] / 100  # percent
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 7 hrs to fix
                                                                                    beem/account.py on lines 1320..1326

                                                                                    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 119.

                                                                                    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 "hbd_last_interest_payment" in self:
                                                                                                last_payment = (self["hbd_last_interest_payment"])
                                                                                                next_payment = last_payment + timedelta(days=30)
                                                                                                interest_rate = self.blockchain.get_dynamic_global_properties()[
                                                                                                    "hbd_interest_rate"] / 100  # percent
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 7 hrs to fix
                                                                                    beem/account.py on lines 1313..1319

                                                                                    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 119.

                                                                                    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 raw_output:
                                                                                                        item_index, event = item
                                                                                                        op_type, op = event['op']
                                                                                                        timestamp = event["timestamp"]
                                                                                                        block_num = event["block"]
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 5 hrs to fix
                                                                                    beem/account.py on lines 2524..2533

                                                                                    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

                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                    Open

                                                                                                    if raw_output:
                                                                                                        item_index, event = item
                                                                                                        op_type, op = event['op']
                                                                                                        timestamp = event["timestamp"]
                                                                                                        block_num = event["block"]
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 5 hrs to fix
                                                                                    beem/account.py on lines 2341..2350

                                                                                    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

                                                                                                    if direction == "follower":
                                                                                                        try:
                                                                                                            followers = self.blockchain.rpc.get_followers(query, api='follow')
                                                                                                        except:
                                                                                                            followers = self.blockchain.rpc.get_followers(self.name, last_user, what, limit, api='condenser')
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 4 hrs to fix
                                                                                    beem/account.py on lines 1101..1107

                                                                                    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 direction == "following":
                                                                                                        try:
                                                                                                            followers = self.blockchain.rpc.get_following(query, api='follow')
                                                                                                        except:
                                                                                                            followers = self.blockchain.rpc.get_following(self.name, last_user, what, limit, api='condenser')
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 4 hrs to fix
                                                                                    beem/account.py on lines 1094..1100

                                                                                    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

                                                                                                    if raw_data and short_entries:
                                                                                                        ret = self.blockchain.rpc.get_blog_entries({'account': account, 'start_entry_id': start_entry_id, 'limit': limit}, api='follow')
                                                                                                        if isinstance(ret, dict) and "blog" in ret:
                                                                                                            ret = ret["blog"]
                                                                                                        return [
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/account.py on lines 871..876

                                                                                    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 70.

                                                                                    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 raw_data:
                                                                                                        ret = self.blockchain.rpc.get_blog({'account': account, 'start_entry_id': start_entry_id, 'limit': limit}, api='follow')
                                                                                                        if isinstance(ret, dict) and "blog" in ret:
                                                                                                            ret = ret["blog"]
                                                                                                        return [
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/account.py on lines 864..869

                                                                                    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 70.

                                                                                    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 isinstance(token_units, Amount):
                                                                                                token_units = Amount(token_units, blockchain_instance=self.blockchain)
                                                                                            elif isinstance(token_units, string_types):
                                                                                                token_units = Amount(token_units, blockchain_instance=self.blockchain)
                                                                                            else:
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 2 other locations - About 3 hrs to fix
                                                                                    beem/witness.py on lines 138..143
                                                                                    beem/witness.py on lines 145..150

                                                                                    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 70.

                                                                                    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

                                                                                        def get_muters(self, raw_name_list=True, limit=100):
                                                                                            """ Returns the account muters as list
                                                                                            """
                                                                                            name_list = [x['follower'] for x in self._get_followers(direction="follower", what="ignore", limit=limit)]
                                                                                            if raw_name_list:
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/account.py on lines 1045..1052

                                                                                    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 2 locations. Consider refactoring.
                                                                                    Open

                                                                                        def get_mutings(self, raw_name_list=True, limit=100):
                                                                                            """ Returns who the account is muting as list
                                                                                            """
                                                                                            name_list = [x['following'] for x in self._get_followers(direction="following", what="ignore", limit=limit)]
                                                                                            if raw_name_list:
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/account.py on lines 1036..1043

                                                                                    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 2 locations. Consider refactoring.
                                                                                    Open

                                                                                            if with_regeneration:
                                                                                                total_down_vp = manabar["current_mana_pct"]
                                                                                            else:
                                                                                                if manabar["max_mana"] > 0:
                                                                                                    total_down_vp = manabar["last_mana"] / manabar["max_mana"] * 100
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/account.py on lines 509..515

                                                                                    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

                                                                                                if with_regeneration:
                                                                                                    total_vp = manabar["current_mana_pct"]
                                                                                                else:
                                                                                                    if manabar["max_mana"] > 0:
                                                                                                        total_vp = manabar["last_mana"] / manabar["max_mana"] * 100
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/account.py on lines 540..546

                                                                                    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

                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                    Open

                                                                                            if memo and memo[0] == "#":
                                                                                                from .memo import Memo
                                                                                                memoObj = Memo(
                                                                                                    from_account=account,
                                                                                                    to_account=to,
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/account.py on lines 2982..2989

                                                                                    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 66.

                                                                                    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(only_ops) > 0:
                                                                                                for op in only_ops:
                                                                                                    op_id = operations[op]
                                                                                                    if op_id <= 64:
                                                                                                        operation_filter_low += 2**op_id
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/account.py on lines 2070..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 66.

                                                                                    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 op in operations:
                                                                                                    op_id = operations[op]
                                                                                                    if op_id <= 64:
                                                                                                        operation_filter_low += 2**op_id
                                                                                                    else:
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/account.py on lines 2062..2068

                                                                                    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 66.

                                                                                    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 p in parse_int_without_zero:
                                                                                                if p in output and isinstance(output[p], integer_types) and output[p] != 0:
                                                                                                    output[p] = str(output[p])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/community.py on lines 145..147

                                                                                    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 66.

                                                                                    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 memo and memo[0] == "#":
                                                                                                from .memo import Memo
                                                                                                memoObj = Memo(
                                                                                                    from_account=account,
                                                                                                    to_account=to,
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/account.py on lines 2921..2928

                                                                                    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 66.

                                                                                    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

                                                                                        def get_followers(self, raw_name_list=True, limit=100):
                                                                                            """ Returns the account followers as list
                                                                                            """
                                                                                            name_list = [x['follower'] for x in self._get_followers(direction="follower", limit=limit)]
                                                                                            if raw_name_list:
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/account.py on lines 1027..1034

                                                                                    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

                                                                                        def get_following(self, raw_name_list=True, limit=100):
                                                                                            """ Returns who the account is following as list
                                                                                            """
                                                                                            name_list = [x['following'] for x in self._get_followers(direction="following", limit=limit)]
                                                                                            if raw_name_list:
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 3 hrs to fix
                                                                                    beem/account.py on lines 1018..1025

                                                                                    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

                                                                                    Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                    Open

                                                                                            if self.blockchain.rpc.url == 'https://api.hive.blog' and (len(only_ops) > 0 or len(exclude_ops) > 0):
                                                                                                operation_filter = True
                                                                                            else:
                                                                                                operation_filter = False
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 2 hrs to fix
                                                                                    beem/account.py on lines 2509..2512

                                                                                    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 57.

                                                                                    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 self.blockchain.rpc.url == 'https://api.hive.blog' and (len(only_ops) > 0 or len(exclude_ops) > 0):
                                                                                                operation_filter = True
                                                                                            else:
                                                                                                operation_filter = False
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 2 hrs to fix
                                                                                    beem/account.py on lines 2327..2330

                                                                                    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 57.

                                                                                    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 cnt == 0:
                                                                                                    followers_list = followers
                                                                                                elif followers is not None and len(followers) > 1:
                                                                                                    followers_list += followers[1:]
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 2 hrs to fix
                                                                                    beem/account.py on lines 1067..1070

                                                                                    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 54.

                                                                                    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 8 locations. Consider refactoring.
                                                                                    Open

                                                                                            for p in parse_times:
                                                                                                if p in account and isinstance(account.get(p), string_types):
                                                                                                    account[p] = formatTimeString(account.get(p, "1970-01-01T00:00:00"))
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 7 other locations - About 2 hrs to fix
                                                                                    beem/block.py on lines 84..86
                                                                                    beem/block.py on lines 369..371
                                                                                    beem/comment.py on lines 88..90
                                                                                    beem/comment.py on lines 129..131
                                                                                    beem/vote.py on lines 130..132
                                                                                    beem/witness.py on lines 80..82
                                                                                    beem/witness.py on lines 86..88

                                                                                    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 54.

                                                                                    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 cnt == 0:
                                                                                                    name_list = followers
                                                                                                elif followers is not None and len(followers) > 1:
                                                                                                    name_list += followers[1:]
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 2 hrs to fix
                                                                                    beem/account.py on lines 1119..1122

                                                                                    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 54.

                                                                                    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 p in parse_int:
                                                                                                if p in account and isinstance(account.get(p), string_types):
                                                                                                    account[p] = int(account.get(p, 0))
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 2 hrs to fix
                                                                                    beem/community.py on lines 123..125

                                                                                    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 54.

                                                                                    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 6 locations. Consider refactoring.
                                                                                    Open

                                                                                            for p in parse_int:
                                                                                                if p in output and isinstance(output[p], integer_types):
                                                                                                    output[p] = str(output[p])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 5 other locations - About 2 hrs to fix
                                                                                    beem/comment.py on lines 225..227
                                                                                    beem/comment.py on lines 240..242
                                                                                    beem/community.py on lines 142..144
                                                                                    beem/vote.py on lines 163..165
                                                                                    beem/witness.py on lines 106..108

                                                                                    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 53.

                                                                                    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 5 locations. Consider refactoring.
                                                                                    Open

                                                                                                    if len(op_type) > 10 and op_type[len(op_type) - 10:] == "_operation":
                                                                                                        op_type = op_type[:-10]
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 4 other locations - About 2 hrs to fix
                                                                                    beem/block.py on lines 280..281
                                                                                    beem/blockchain.py on lines 742..743
                                                                                    beem/blockchain.py on lines 751..752
                                                                                    beem/blockchain.py on lines 816..817

                                                                                    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 52.

                                                                                    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

                                                                                            op = operations.Convert(
                                                                                                **{
                                                                                                    "owner": account["name"],
                                                                                                    "requestid": request_id,
                                                                                                    "amount": amount,
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 2 hrs to fix
                                                                                    beem/account.py on lines 3087..3093

                                                                                    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 51.

                                                                                    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

                                                                                            op = operations.Collateralized_convert(
                                                                                                **{
                                                                                                    "owner": account["name"],
                                                                                                    "requestid": request_id,
                                                                                                    "amount": amount,
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 2 hrs to fix
                                                                                    beem/account.py on lines 3055..3061

                                                                                    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 51.

                                                                                    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 (start_author is None and start_permlink is not None) or \
                                                                                               (start_author is not None and start_permlink is None):
                                                                                                raise AssertionError("either both or none of `start_author` and "
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 2 hrs to fix
                                                                                    beem/account.py on lines 3763..3765

                                                                                    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 50.

                                                                                    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 (start_author is None and start_permlink is not None) or \
                                                                                               (start_author is not None and start_permlink is None):
                                                                                                raise AssertionError("either both or none of `start_author` and "
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 2 hrs to fix
                                                                                    beem/account.py on lines 3560..3562

                                                                                    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 50.

                                                                                    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 operation_filter:
                                                                                                        yield item
                                                                                                    else:
                                                                                                        if exclude_ops and op_type in exclude_ops:
                                                                                                            continue
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 2 hrs to fix
                                                                                    beem/account.py on lines 2555..2561

                                                                                    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 50.

                                                                                    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 operation_filter:
                                                                                                        yield item
                                                                                                    else:
                                                                                                        if exclude_ops and op_type in exclude_ops:
                                                                                                            continue
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 2 hrs to fix
                                                                                    beem/account.py on lines 2370..2376

                                                                                    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 50.

                                                                                    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

                                                                                                    ret += "transfer - %.2f G RC - enough RC for %d transfers\n" % (rc_calc.transfer() / 10**9, int(estimated_rc / rc_calc.transfer()))
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 1 hr to fix
                                                                                    beem/account.py on lines 425..425
                                                                                    beem/account.py on lines 426..426
                                                                                    beem/account.py on lines 428..428

                                                                                    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 46.

                                                                                    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

                                                                                                    ret += "comment - %.2f G RC - enough RC for %d comments\n" % (rc_calc.comment() / 10**9, int(estimated_rc / rc_calc.comment()))
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 1 hr to fix
                                                                                    beem/account.py on lines 426..426
                                                                                    beem/account.py on lines 427..427
                                                                                    beem/account.py on lines 428..428

                                                                                    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 46.

                                                                                    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

                                                                                                    ret += "vote - %.2f G RC - enough RC for %d votes\n" % (rc_calc.vote() / 10**9, int(estimated_rc / rc_calc.vote()))
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 1 hr to fix
                                                                                    beem/account.py on lines 425..425
                                                                                    beem/account.py on lines 427..427
                                                                                    beem/account.py on lines 428..428

                                                                                    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 46.

                                                                                    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

                                                                                                    ret += "custom_json - %.2f G RC - enough RC for %d custom_json\n" % (rc_calc.custom_json() / 10**9, int(estimated_rc / rc_calc.custom_json()))
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 1 hr to fix
                                                                                    beem/account.py on lines 425..425
                                                                                    beem/account.py on lines 426..426
                                                                                    beem/account.py on lines 427..427

                                                                                    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 46.

                                                                                    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(last_post_d) > 0:
                                                                                                t.add_row(["Mean last post diff in days", "%.2f" % (sum(last_post_d) / len(last_post_d))])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 3847..3848

                                                                                    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 46.

                                                                                    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(["Balance", "%s, %s" % (str(self.balances["available"][0]), str(self.balances["available"][1]))])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 413..413

                                                                                    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 46.

                                                                                    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(last_vote_h) > 0):
                                                                                                t.add_row(["Mean last vote diff in hours", "%.2f" % (sum(last_vote_h) / len(last_vote_h))])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 3849..3850

                                                                                    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 46.

                                                                                    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

                                                                                                ret += "%s, %s\n" % (str(self.balances["available"][0]), str(self.balances["available"][1]))
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 380..380

                                                                                    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 46.

                                                                                    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

                                                                                            op = operations.Account_update(**{
                                                                                                "account": account["name"],
                                                                                                permission: authority,
                                                                                                "memo_key": account["memo_key"],
                                                                                                "json_metadata": account["json_metadata"],
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 3434..3439

                                                                                    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 45.

                                                                                    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

                                                                                            op = operations.Account_update(**{
                                                                                                "account": account["name"],
                                                                                                permission: authority,
                                                                                                "memo_key": account["memo_key"],
                                                                                                "json_metadata": account["json_metadata"],
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 3508..3513

                                                                                    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 45.

                                                                                    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 self.blockchain.rpc.get_use_appbase():
                                                                                                    accounts += self.blockchain.rpc.find_accounts({'accounts': name_list[name_cnt:batch_limit + name_cnt]}, api="database")["accounts"]
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/witness.py on lines 313..313

                                                                                    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 45.

                                                                                    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 permission not in account:
                                                                                                account = Account(account, blockchain_instance=self.blockchain, lazy=False, full=True)
                                                                                                account.clear_cache()
                                                                                                account.refresh()
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/transactionbuilder.py on lines 215..218

                                                                                    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 45.

                                                                                    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

                                                                                                    ret += " (%.0f G RC of %.0f G RC)\n" % (estimated_rc / 10**9, int(rc["max_rc"]) / 10**9)
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 387..387

                                                                                    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 44.

                                                                                    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(["Remaining RC", "(%.0f G RC of %.0f G RC)" % (estimated_rc / 10**9, int(rc["max_rc"]) / 10**9)])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 422..422

                                                                                    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 44.

                                                                                    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

                                                                                        @property
                                                                                        def json_metadata(self):
                                                                                            if self["json_metadata"] == '':
                                                                                                return {}
                                                                                            return json.loads(self["json_metadata"])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 344..348

                                                                                    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 42.

                                                                                    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

                                                                                        @property
                                                                                        def posting_json_metadata(self):
                                                                                            if self["posting_json_metadata"] == '':
                                                                                                return {}
                                                                                            return json.loads(self["posting_json_metadata"])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 338..342

                                                                                    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 42.

                                                                                    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 4 locations. Consider refactoring.
                                                                                    Open

                                                                                            if limit is not None:
                                                                                                if not isinstance(limit, integer_types) or limit <= 0:
                                                                                                    raise AssertionError("`limit` has to be greater than 0`")
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 1 hr to fix
                                                                                    beem/account.py on lines 3557..3559
                                                                                    beem/account.py on lines 3625..3627
                                                                                    beem/account.py on lines 3694..3696

                                                                                    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 41.

                                                                                    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 4 locations. Consider refactoring.
                                                                                    Open

                                                                                            if limit is not None:
                                                                                                if not isinstance(limit, integer_types) or limit <= 0:
                                                                                                    raise AssertionError("`limit` has to be greater than 0`")
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 1 hr to fix
                                                                                    beem/account.py on lines 3557..3559
                                                                                    beem/account.py on lines 3694..3696
                                                                                    beem/account.py on lines 3760..3762

                                                                                    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 41.

                                                                                    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 4 locations. Consider refactoring.
                                                                                    Open

                                                                                            if limit is not None:
                                                                                                if not isinstance(limit, integer_types) or limit <= 0:
                                                                                                    raise AssertionError("`limit` has to be greater than 0`")
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 1 hr to fix
                                                                                    beem/account.py on lines 3625..3627
                                                                                    beem/account.py on lines 3694..3696
                                                                                    beem/account.py on lines 3760..3762

                                                                                    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 41.

                                                                                    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 4 locations. Consider refactoring.
                                                                                    Open

                                                                                            if limit is not None:
                                                                                                if not isinstance(limit, integer_types) or limit <= 0:
                                                                                                    raise AssertionError("`limit` has to be greater than 0`")
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 1 hr to fix
                                                                                    beem/account.py on lines 3557..3559
                                                                                    beem/account.py on lines 3625..3627
                                                                                    beem/account.py on lines 3760..3762

                                                                                    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 41.

                                                                                    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 isinstance(metadata, dict):
                                                                                                metadata = json.dumps(metadata)
                                                                                            elif not isinstance(metadata, str):
                                                                                                raise ValueError("Profile must be a dict or string!")
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 2682..2685

                                                                                    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 41.

                                                                                    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 permission == "owner":
                                                                                                return self.blockchain.finalizeOp(op, account, "owner", **kwargs)
                                                                                            else:
                                                                                                return self.blockchain.finalizeOp(op, account, "active", **kwargs)
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 3515..3518

                                                                                    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 41.

                                                                                    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 permission == "owner":
                                                                                                return self.blockchain.finalizeOp(op, account, "owner", **kwargs)
                                                                                            else:
                                                                                                return self.blockchain.finalizeOp(op, account, "active", **kwargs)
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 3441..3444

                                                                                    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 41.

                                                                                    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 isinstance(metadata, dict):
                                                                                                metadata = json.dumps(metadata)
                                                                                            elif not isinstance(metadata, str):
                                                                                                raise ValueError("Profile must be a dict or string!")
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 2707..2710

                                                                                    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 41.

                                                                                    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

                                                                                        def get_blog_entries(self, start_entry_id=0, limit=100, raw_data=True,
                                                                                                             account=None):
                                                                                            """ Returns the list of blog entries for an account
                                                                                    
                                                                                                :param int start_entry_id: default is 0
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 776..801

                                                                                    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 41.

                                                                                    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

                                                                                        def get_feed_entries(self, start_entry_id=0, limit=100, raw_data=True,
                                                                                                             account=None):
                                                                                            """ Returns a list of entries in an account’s feed
                                                                                    
                                                                                                :param int start_entry_id: default is 0
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 803..828

                                                                                    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 41.

                                                                                    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 isinstance(self.blockchain, Steem):
                                                                                                vote_pct = self.blockchain.rshares_to_vote_pct(self.blockchain.sbd_to_rshares(token_units, not_broadcasted_vote=not_broadcasted_vote), post_rshares=post_rshares, voting_power=voting_power * 100, steem_power=token_power)
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 1 other location - About 1 hr to fix
                                                                                    beem/account.py on lines 645..648

                                                                                    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 41.

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                            if account is None:
                                                                                                account = self
                                                                                            elif not skip_account_check:
                                                                                                account = Account(account, blockchain_instance=self.blockchain)
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 2 other locations - About 1 hr to fix
                                                                                    beem/account.py on lines 2911..2914
                                                                                    beem/account.py on lines 2972..2975

                                                                                    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 39.

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                            if account is None:
                                                                                                account = self  
                                                                                            elif not skip_account_check:
                                                                                                account = Account(account, blockchain_instance=self.blockchain)
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 2 other locations - About 1 hr to fix
                                                                                    beem/account.py on lines 2911..2914
                                                                                    beem/account.py on lines 3013..3016

                                                                                    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 39.

                                                                                    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 3 locations. Consider refactoring.
                                                                                    Open

                                                                                            if account is None:
                                                                                                account = self  
                                                                                            elif not skip_account_check:
                                                                                                account = Account(account, blockchain_instance=self.blockchain)
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 2 other locations - About 1 hr to fix
                                                                                    beem/account.py on lines 2972..2975
                                                                                    beem/account.py on lines 3013..3016

                                                                                    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 39.

                                                                                    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 6 locations. Consider refactoring.
                                                                                    Open

                                                                                            super(Accounts, self).__init__(
                                                                                                [
                                                                                                    Account(x, lazy=lazy, full=full, blockchain_instance=self.blockchain)
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 5 other locations - About 1 hr to fix
                                                                                    beem/block.py on lines 415..417
                                                                                    beem/community.py on lines 460..462
                                                                                    beem/witness.py on lines 319..321
                                                                                    beem/witness.py on lines 412..414
                                                                                    beem/witness.py on lines 519..521

                                                                                    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 38.

                                                                                    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

                                                                                            op = operations.Account_update(
                                                                                                **{
                                                                                                    "account": account["name"],
                                                                                                    "memo_key": account["memo_key"],
                                                                                                    "json_metadata": metadata,
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 1 other location - About 55 mins to fix
                                                                                    beem/account.py on lines 3304..3309

                                                                                    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 37.

                                                                                    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

                                                                                            op = operations.Delegate_vesting_shares(
                                                                                                **{
                                                                                                    "delegator": account["name"],
                                                                                                    "delegatee": to_account["name"],
                                                                                                    "vesting_shares": vesting_shares,
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 1 other location - About 55 mins to fix
                                                                                    beem/account.py on lines 2686..2691

                                                                                    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 37.

                                                                                    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 4 locations. Consider refactoring.
                                                                                    Open

                                                                                                if len(results) == 0 or (start_permlink and len(results) == 1):
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 45 mins to fix
                                                                                    beem/account.py on lines 3579..3579
                                                                                    beem/account.py on lines 3647..3647
                                                                                    beem/account.py on lines 3788..3788

                                                                                    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 35.

                                                                                    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 4 locations. Consider refactoring.
                                                                                    Open

                                                                                                if len(results) == 0 or (start_permlink and len(results) == 1):
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 45 mins to fix
                                                                                    beem/account.py on lines 3579..3579
                                                                                    beem/account.py on lines 3714..3714
                                                                                    beem/account.py on lines 3788..3788

                                                                                    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 35.

                                                                                    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 4 locations. Consider refactoring.
                                                                                    Open

                                                                                                if len(results) == 0 or (start_permlink and len(results) == 1):
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 45 mins to fix
                                                                                    beem/account.py on lines 3579..3579
                                                                                    beem/account.py on lines 3647..3647
                                                                                    beem/account.py on lines 3714..3714

                                                                                    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 35.

                                                                                    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 4 locations. Consider refactoring.
                                                                                    Open

                                                                                                if len(results) == 0 or (start_permlink and len(results) == 1):
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 45 mins to fix
                                                                                    beem/account.py on lines 3647..3647
                                                                                    beem/account.py on lines 3714..3714
                                                                                    beem/account.py on lines 3788..3788

                                                                                    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 35.

                                                                                    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

                                                                                            for amount in amount_list:
                                                                                                if amount in self:
                                                                                                    savings_amount.append(self[amount].copy())
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 2 other locations - About 45 mins to fix
                                                                                    beem/account.py on lines 1166..1168
                                                                                    beem/account.py on lines 1194..1196

                                                                                    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 35.

                                                                                    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

                                                                                            for amount in amount_list:
                                                                                                if amount in self:
                                                                                                    rewards_amount.append(self[amount].copy())
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 2 other locations - About 45 mins to fix
                                                                                    beem/account.py on lines 1166..1168
                                                                                    beem/account.py on lines 1180..1182

                                                                                    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 35.

                                                                                    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

                                                                                            for amount in amount_list:
                                                                                                if amount in self:
                                                                                                    available_amount.append(self[amount].copy())
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 2 other locations - About 45 mins to fix
                                                                                    beem/account.py on lines 1180..1182
                                                                                    beem/account.py on lines 1194..1196

                                                                                    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 35.

                                                                                    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

                                                                                                    t.add_row(["Est. RC for a custom_json", "%.2f G RC" % (rc_calc.custom_json() / 10**9)])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 40 mins to fix
                                                                                    beem/account.py on lines 389..389
                                                                                    beem/account.py on lines 390..390
                                                                                    beem/account.py on lines 391..391

                                                                                    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 34.

                                                                                    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

                                                                                                    t.add_row(["Est. RC for a vote", "%.2f G RC" % (rc_calc.vote() / 10**9)])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 40 mins to fix
                                                                                    beem/account.py on lines 389..389
                                                                                    beem/account.py on lines 391..391
                                                                                    beem/account.py on lines 392..392

                                                                                    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 34.

                                                                                    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

                                                                                                    t.add_row(["Est. RC for a transfer", "%.2f G RC" % (rc_calc.transfer() / 10**9)])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 40 mins to fix
                                                                                    beem/account.py on lines 389..389
                                                                                    beem/account.py on lines 390..390
                                                                                    beem/account.py on lines 392..392

                                                                                    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 34.

                                                                                    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

                                                                                                    t.add_row(["Est. RC for a comment", "%.2f G RC" % (rc_calc.comment() / 10**9)])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 40 mins to fix
                                                                                    beem/account.py on lines 390..390
                                                                                    beem/account.py on lines 391..391
                                                                                    beem/account.py on lines 392..392

                                                                                    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 34.

                                                                                    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 5 locations. Consider refactoring.
                                                                                    Open

                                                                                            super(Account, self).__init__(account, id_item="name", lazy=self.lazy, full=self.full, blockchain_instance=self.blockchain)
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 4 other locations - About 35 mins to fix
                                                                                    beem/comment.py on lines 187..187
                                                                                    beem/community.py on lines 117..117
                                                                                    beem/vote.py on lines 124..124
                                                                                    beem/witness.py on lines 74..74

                                                                                    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 33.

                                                                                    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

                                                                                                    estimated_rc = int(rc["max_rc"]) * rc_mana["current_pct"] / 100
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 1 other location - About 35 mins to fix
                                                                                    beem/account.py on lines 385..385

                                                                                    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 33.

                                                                                    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

                                                                                                    estimated_rc = int(rc["max_rc"]) * rc_mana["current_pct"] / 100
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 1 other location - About 35 mins to fix
                                                                                    beem/account.py on lines 419..419

                                                                                    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 33.

                                                                                    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 max_mana > 0:
                                                                                                current_pct = current_mana / max_mana * 100
                                                                                            else:
                                                                                                current_pct = 0
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 2 other locations - About 35 mins to fix
                                                                                    beem/account.py on lines 469..472
                                                                                    beem/account.py on lines 494..497

                                                                                    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 33.

                                                                                    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 max_mana > 0:
                                                                                                current_mana_pct = current_mana / max_mana * 100
                                                                                            else:
                                                                                                current_mana_pct = 0
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 2 other locations - About 35 mins to fix
                                                                                    beem/account.py on lines 274..277
                                                                                    beem/account.py on lines 494..497

                                                                                    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 33.

                                                                                    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 max_mana > 0:
                                                                                                current_mana_pct = current_mana / max_mana * 100
                                                                                            else:
                                                                                                current_mana_pct = 0
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 2 other locations - About 35 mins to fix
                                                                                    beem/account.py on lines 274..277
                                                                                    beem/account.py on lines 469..472

                                                                                    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 33.

                                                                                    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 first < _limit - 1 and self.blockchain.rpc.url == "https://api.hive.blog":
                                                                                                    first = _limit - 1
                                                                                                elif first < _limit and self.blockchain.rpc.url != "https://api.hive.blog":
                                                                                                    first = _limit
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 1 other location - About 30 mins to fix
                                                                                    beem/account.py on lines 2317..2320

                                                                                    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 32.

                                                                                    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

                                                                                                    t.add_row(["Votes with current RC", "%d votes" % (int(estimated_rc / rc_calc.vote()))])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 30 mins to fix
                                                                                    beem/account.py on lines 394..394
                                                                                    beem/account.py on lines 396..396
                                                                                    beem/account.py on lines 397..397

                                                                                    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 32.

                                                                                    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 first < _limit and self.blockchain.rpc.url == "https://api.hive.blog":
                                                                                                first = _limit - 1
                                                                                            elif first < _limit and self.blockchain.rpc.url != "https://api.hive.blog":
                                                                                                first = _limit
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 1 other location - About 30 mins to fix
                                                                                    beem/account.py on lines 2334..2337

                                                                                    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 32.

                                                                                    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

                                                                                                    t.add_row(["Comments with current RC", "%d comments" % (int(estimated_rc / rc_calc.comment()))])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 30 mins to fix
                                                                                    beem/account.py on lines 395..395
                                                                                    beem/account.py on lines 396..396
                                                                                    beem/account.py on lines 397..397

                                                                                    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 32.

                                                                                    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

                                                                                                    t.add_row(["Custom_json with current RC", "%d transfers" % (int(estimated_rc / rc_calc.custom_json()))])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 30 mins to fix
                                                                                    beem/account.py on lines 394..394
                                                                                    beem/account.py on lines 395..395
                                                                                    beem/account.py on lines 396..396

                                                                                    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 32.

                                                                                    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

                                                                                                    t.add_row(["Transfer with current RC", "%d transfers" % (int(estimated_rc / rc_calc.transfer()))])
                                                                                    Severity: Major
                                                                                    Found in beem/account.py and 3 other locations - About 30 mins to fix
                                                                                    beem/account.py on lines 394..394
                                                                                    beem/account.py on lines 395..395
                                                                                    beem/account.py on lines 397..397

                                                                                    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 32.

                                                                                    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 limit is not None:
                                                                                                    query_limit = min(limit - feed_count + 1, query_limit)
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 2 other locations - About 30 mins to fix
                                                                                    beem/account.py on lines 3706..3707
                                                                                    beem/account.py on lines 3779..3780

                                                                                    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 32.

                                                                                    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 limit is not None:
                                                                                                    query_limit = min(limit - reply_count + 1, query_limit)
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 2 other locations - About 30 mins to fix
                                                                                    beem/account.py on lines 3572..3573
                                                                                    beem/account.py on lines 3706..3707

                                                                                    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 32.

                                                                                    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 limit is not None:
                                                                                                    query_limit = min(limit - comment_count + 1, query_limit)
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 2 other locations - About 30 mins to fix
                                                                                    beem/account.py on lines 3572..3573
                                                                                    beem/account.py on lines 3779..3780

                                                                                    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 32.

                                                                                    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 stop is not None and use_block_num and order == 1 and event['block'] > stop:
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 1 other location - About 30 mins to fix
                                                                                    beem/account.py on lines 2143..2143

                                                                                    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 32.

                                                                                    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 start is not None and use_block_num and order == 1 and event['block'] < start:
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 1 other location - About 30 mins to fix
                                                                                    beem/account.py on lines 2155..2155

                                                                                    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 32.

                                                                                    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 stop is not None and use_block_num and order == -1 and event['block'] < stop:
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 1 other location - About 30 mins to fix
                                                                                    beem/account.py on lines 2141..2141

                                                                                    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 32.

                                                                                    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 start is not None and use_block_num and order == -1 and event['block'] > start:
                                                                                    Severity: Minor
                                                                                    Found in beem/account.py and 1 other location - About 30 mins to fix
                                                                                    beem/account.py on lines 2153..2153

                                                                                    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 32.

                                                                                    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

                                                                                    There are no issues that match your filters.

                                                                                    Category
                                                                                    Status