gappleto97/Senior-Project

View on GitHub
common/bounty.py

Summary

Maintainability
F
6 days
Test Coverage

File bounty.py has 340 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import os, pickle, re, sys, rsa
from common.safeprint import safeprint
from common.call import parse
from multiprocessing import Lock
from hashlib import sha256
Severity: Minor
Found in common/bounty.py - About 4 hrs to fix

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

    def depickle(string):
        """Handles the potential errors in unpickling a bounty"""
        if isinstance(string, Bounty):
            return string
        safeprint([sys.version_info[0], sys.version_info[1], sys.version_info[2]])
    Severity: Minor
    Found in common/bounty.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 isValid. (9)
    Open

        def isValid(self):
            """Internal method which checks the Bounty as valid in the most minimal version
    
            ip      -- Must be in valid range
            btc     -- Must be in valid namespace
    Severity: Minor
    Found in common/bounty.py by radon

    Cyclomatic Complexity

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

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

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

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

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

    def verify(string):
        """External method which checks the Bounty as valid under implementation-specific requirements. This can be defined per user.
    
        ip      -- Must be in valid range
        btc     -- Must be in valid namespace
    Severity: Minor
    Found in common/bounty.py by radon

    Cyclomatic Complexity

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

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

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

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

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

    def addBounties(bounties):
        """Add a list of bounties in parallel using multiprocessing.Pool for verification"""
        from multiprocessing.pool import ThreadPool
        pool = ThreadPool()
        safeprint("Mapping verifications", verbosity=3)
    Severity: Minor
    Found in common/bounty.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 isValid has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def isValid(self):
            """Internal method which checks the Bounty as valid in the most minimal version
    
            ip      -- Must be in valid range
            btc     -- Must be in valid namespace
    Severity: Minor
    Found in common/bounty.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 depickle has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    def depickle(string):
        """Handles the potential errors in unpickling a bounty"""
        if isinstance(string, Bounty):
            return string
        safeprint([sys.version_info[0], sys.version_info[1], sys.version_info[2]])
    Severity: Minor
    Found in common/bounty.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 verify has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    def verify(string):
        """External method which checks the Bounty as valid under implementation-specific requirements. This can be defined per user.
    
        ip      -- Must be in valid range
        btc     -- Must be in valid namespace
    Severity: Minor
    Found in common/bounty.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 addBounties has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    def addBounties(bounties):
        """Add a list of bounties in parallel using multiprocessing.Pool for verification"""
        from multiprocessing.pool import ThreadPool
        pool = ThreadPool()
        safeprint("Mapping verifications", verbosity=3)
    Severity: Minor
    Found in common/bounty.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 False
    Severity: Major
    Found in common/bounty.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return -1
      Severity: Major
      Found in common/bounty.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return -1
        Severity: Major
        Found in common/bounty.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return 1
          Severity: Major
          Found in common/bounty.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

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

              Avoid too many return statements within this function.
              Open

                              return 1
              Severity: Major
              Found in common/bounty.py - About 30 mins to fix

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

                    try:
                        safeprint("Testing IP address", verbosity=1)
                        if not checkIPAddressValid(test.ip):
                            return False
                        safeprint("Testing Bitcoin address", verbosity=1)
                Severity: Major
                Found in common/bounty.py and 1 other location - About 1 day to fix
                common/bounty.py on lines 141..161

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

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

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

                        try:
                            safeprint("Testing IP address", verbosity=1)
                            if not checkIPAddressValid(self.ip):
                                return False
                            safeprint("Testing Bitcoin address", verbosity=1)
                Severity: Major
                Found in common/bounty.py and 1 other location - About 1 day to fix
                common/bounty.py on lines 230..250

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

                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.data.get('perms') != {} and isinstance(self.data.get('perms'), dict):
                            output = output + ", perms=" + str(sorted(self.data.get('perms').items(), key=lambda x: x[0]))
                Severity: Major
                Found in common/bounty.py and 1 other location - About 5 hrs to fix
                common/bounty.py on lines 50..51

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

                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.data.get('reqs') != {} and isinstance(self.data.get('reqs'), dict):
                            output = output + ", reqs=" + str(sorted(self.data.get('reqs').items(), key=lambda x: x[0]))
                Severity: Major
                Found in common/bounty.py and 1 other location - About 5 hrs to fix
                common/bounty.py on lines 52..53

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

                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 not os.path.exists(bounty_path.split(os.sep)[0]):
                        os.mkdir(bounty_path.split(os.sep)[0])
                Severity: Major
                Found in common/bounty.py and 2 other locations - About 2 hrs to fix
                common/peers.py on lines 124..125
                common/settings.py on lines 17..18

                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

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

                    def __ge__(self, other):
                        """Determines whether this bounty has a higher or is equal"""
                        boolean = self.__gt__(other)
                        if boolean:
                            return boolean
                Severity: Major
                Found in common/bounty.py and 1 other location - About 1 hr to fix
                common/bounty.py on lines 94..100

                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

                    def __le__(self, other):
                        """Determines whether this bounty has a lower priority or is equal"""
                        boolean = self.__lt__(other)
                        if boolean:
                            return boolean
                Severity: Major
                Found in common/bounty.py and 1 other location - About 1 hr to fix
                common/bounty.py on lines 102..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 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

                Line too long (86 > 79 characters)
                Open

                        output = output + ", id=" + str(self.ident) + ", timeout=" + str(self.timeout)
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (98 > 79 characters)
                Open

                    def sign(self, privateKey):  # where privateKey is a private key generated by rsa.PrivateKey()
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (88 > 79 characters)
                Open

                    async = pool.map_async(verify, bounties)  # defer this for possible efficiency boost
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (107 > 79 characters)
                Open

                        safeprint("Finishing the processing of bounty " + str(i+1) + "/" + str(len(bounties)), verbosity=2)
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (88 > 79 characters)
                Open

                                if rsa.verify(str((n, e)).encode('utf-8'), data.get('cert'), masterKey):
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (101 > 79 characters)
                Open

                        """long does not have a to_bytes() in versions less than 3. This is an equivalent function"""
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Do not use bare 'except'
                Open

                            except:
                Severity: Minor
                Found in common/bounty.py by pep8

                When catching exceptions, mention specific exceptions when possible.

                Okay: except Exception:
                Okay: except BaseException:
                E722: except:

                Do not use bare 'except'
                Open

                    except:
                Severity: Minor
                Found in common/bounty.py by pep8

                When catching exceptions, mention specific exceptions when possible.

                Okay: except Exception:
                Okay: except BaseException:
                E722: except:

                Do not use bare 'except'
                Open

                        except:
                Severity: Minor
                Found in common/bounty.py by pep8

                When catching exceptions, mention specific exceptions when possible.

                Okay: except Exception:
                Okay: except BaseException:
                E722: except:

                Do not use bare 'except'
                Open

                        except:
                Severity: Minor
                Found in common/bounty.py by pep8

                When catching exceptions, mention specific exceptions when possible.

                Okay: except Exception:
                Okay: except BaseException:
                E722: except:

                Do not use bare 'except'
                Open

                        except:
                Severity: Minor
                Found in common/bounty.py by pep8

                When catching exceptions, mention specific exceptions when possible.

                Okay: except Exception:
                Okay: except BaseException:
                E722: except:

                Line too long (85 > 79 characters)
                Open

                        if self.data.get('perms') != {} and isinstance(self.data.get('perms'), dict):
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (132 > 79 characters)
                Open

                    """Check to see if a Bitcoin address is within the valid namespace. Will potentially give false positives based on leading 1s"""
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (110 > 79 characters)
                Open

                            return (self.reward == other.reward) and (self.ident == other.ident) and (self.data == other.data)
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (105 > 79 characters)
                Open

                        decimal = decimal * 58 + '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'.index(char)
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Do not use bare 'except'
                Open

                    except:
                Severity: Minor
                Found in common/bounty.py by pep8

                When catching exceptions, mention specific exceptions when possible.

                Okay: except Exception:
                Okay: except BaseException:
                E722: except:

                Line too long (132 > 79 characters)
                Open

                    """This adds a bounty to the list under the assumption that it's already been validated. Must be of type common.bounty.Bounty"""
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (99 > 79 characters)
                Open

                            if self.reward not in range(1440, 100000001) or (not self.reward and self.checkSign()):
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (129 > 79 characters)
                Open

                    """External method which checks the Bounty as valid under implementation-specific requirements. This can be defined per user.
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (88 > 79 characters)
                Open

                    """Add a list of bounties in parallel using multiprocessing.Pool for verification"""
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Do not use bare 'except'
                Open

                        except:
                Severity: Minor
                Found in common/bounty.py by pep8

                When catching exceptions, mention specific exceptions when possible.

                Okay: except Exception:
                Okay: except BaseException:
                E722: except:

                'async' and 'await' are reserved keywords starting with python 3.7
                Open

                    async = pool.map_async(verify, bounties)  # defer this for possible efficiency boost
                Severity: Minor
                Found in common/bounty.py by pep8

                'async' and 'await' are reserved keywords starting at Python 3.7.

                W606: async = 42
                W606: await = 42
                Okay: async def read(db):
                data = await db.fetch('SELECT ...')

                Line too long (106 > 79 characters)
                Open

                        output = "<Bounty: ip=" + str(self.ip) + ", btc=" + str(self.btc) + ", reward=" + str(self.reward)
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (83 > 79 characters)
                Open

                        if self.data.get('reqs') != {} and isinstance(self.data.get('reqs'), dict):
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Do not use bare 'except'
                Open

                    except:
                Severity: Minor
                Found in common/bounty.py by pep8

                When catching exceptions, mention specific exceptions when possible.

                Okay: except Exception:
                Okay: except BaseException:
                E722: except:

                Do not use bare 'except'
                Open

                        except:
                Severity: Minor
                Found in common/bounty.py by pep8

                When catching exceptions, mention specific exceptions when possible.

                Okay: except Exception:
                Okay: except BaseException:
                E722: except:

                Do not use bare 'except'
                Open

                        except:
                Severity: Minor
                Found in common/bounty.py by pep8

                When catching exceptions, mention specific exceptions when possible.

                Okay: except Exception:
                Okay: except BaseException:
                E722: except:

                Line too long (95 > 79 characters)
                Open

                        if test.reward not in range(1440, 100000001) or (not test.reward and test.checkSign()):
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (122 > 79 characters)
                Open

                    if sys.version_info[0] == 2 and sys.version_info[1] == 6 and (isinstance(string, str) or isinstance(string, unicode)):
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (114 > 79 characters)
                Open

                        temp = list(set(bountyList))  # trim it in the simplest way possible. Doesn't protect against malleability
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Line too long (106 > 79 characters)
                Open

                            output = output + ", perms=" + str(sorted(self.data.get('perms').items(), key=lambda x: x[0]))
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                'async' and 'await' are reserved keywords starting with python 3.7
                Open

                    external = async.get()
                Severity: Minor
                Found in common/bounty.py by pep8

                'async' and 'await' are reserved keywords starting at Python 3.7.

                W606: async = 42
                W606: await = 42
                Okay: async def read(db):
                data = await db.fetch('SELECT ...')

                Line too long (104 > 79 characters)
                Open

                            output = output + ", reqs=" + str(sorted(self.data.get('reqs').items(), key=lambda x: x[0]))
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                Do not use bare 'except'
                Open

                        except:
                Severity: Minor
                Found in common/bounty.py by pep8

                When catching exceptions, mention specific exceptions when possible.

                Okay: except Exception:
                Okay: except BaseException:
                E722: except:

                Do not use bare 'except'
                Open

                        except:
                Severity: Minor
                Found in common/bounty.py by pep8

                When catching exceptions, mention specific exceptions when possible.

                Okay: except Exception:
                Okay: except BaseException:
                E722: except:

                Line too long (87 > 79 characters)
                Open

                        """Internal method which checks the Bounty as valid in the most minimal version
                Severity: Minor
                Found in common/bounty.py by pep8

                Limit all lines to a maximum of 79 characters.

                There are still many devices around that are limited to 80 character
                lines; plus, limiting windows to 80 characters makes it possible to
                have several windows side-by-side.  The default wrapping on such
                devices looks ugly.  Therefore, please limit all lines to a maximum
                of 79 characters. For flowing long blocks of text (docstrings or
                comments), limiting the length to 72 characters is recommended.
                
                Reports error E501.

                There are no issues that match your filters.

                Category
                Status