motom001/DoorPi

View on GitHub
get_pip.py

Summary

Maintainability
F
1 mo
Test Coverage

File get_pip.py has 17487 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python
#
# Hi There!
# You may be wondering what this giant blob of binary data here is, you might
# even be worried that we're up to something nefarious (good for you for being
Severity: Major
Found in get_pip.py - About 1 mo to fix

    Function b85decode has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
    Open

        def b85decode(b):
            _b85dec = [None] * 256
            for i, c in enumerate(iterbytes(_b85alphabet)):
                _b85dec[c] = i
    
    
    Severity: Minor
    Found in get_pip.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 bootstrap has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

    def bootstrap(tmpdir=None):
        # Import pip so we can use it to install pip and maybe setuptools too
        import pip
        from pip.commands.install import InstallCommand
    
    
    Severity: Minor
    Found in get_pip.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

    There are no issues that match your filters.

    Category
    Status