Showing 11 of 15 total issues
Function main
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def main(**kwargs):
"""
Generate a report to inform about PyPI dependencies.
.. _PyPIContents: https://github.com/LuisAlejandro/pypicontents
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_package_dirs
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def get_package_dirs(path):
"""
List directories containing python packages on ``path``.
:param path: a path pointing to a directory containing python code.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ask_multiple_pypi
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def ask_multiple_pypi(datadict):
"""
Ask the user about which PyPI package will use to satisfy an import.
:param datadict: a dictionary containing modules as keys and
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fill_with_stdlib
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def fill_with_stdlib(datadict, stdlibdata):
"""
Fill ``datadict`` with modules from ``stdlibdata`` if found.
:param datadict: a dictionary containing modules as keys and
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fill_with_pypi
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def fill_with_pypi(datadict, pypidata):
"""
Fill ``datadict`` with modules from ``pypidata`` if found.
.. _PyPIContents: https://github.com/LuisAlejandro/pypicontents
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function find_imports
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def find_imports(package, filename):
"""
Get a list of modules extracted from import statements.
:param package: a string containing a python package to which ``filename``
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_modules
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_modules(pkgdata):
"""
List modules inside packages provided in ``pkgdata``.
:param pkgdata: a list of tuples containing the name of a package and
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_imports
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_imports(pkgdata):
"""
List modules imported inside of packages provided in ``pkgdata``.
:param pkgdata: a list of tuples containing the name of a package and
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_messages
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_messages(datadict):
"""
Generate messages for each type of module in ``datadict``.
:param datadict: a dictionary containing modules as keys and
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_packages
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_packages(path):
"""
List packages living in ``path`` with its directory.
:param path: a path pointing to a directory containing python code.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function find_files
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_files(path=None, pattern='*'):
"""
Locate all the files matching the supplied ``pattern`` in ``path``.
Locate all the files matching the supplied filename pattern in and below
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"