Showing 9,400 of 17,590 total issues
Function _interfaces_ifconfig
has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring. Open
def _interfaces_ifconfig(out):
'''
Uses ifconfig to return a dictionary of interfaces with various information
about each (up/down state, ip address, netmask, and hwaddr)
'''
- 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 append_to_package_conf
has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring. Open
def append_to_package_conf(conf, atom='', flags=None, string='', overwrite=False):
'''
Append a string or a list of flags for a given package or DEPEND atom to a
given configuration file.
- 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
File napalm_netacl.py
has 745 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
NAPALM ACL
==========
File debuild_pkgbuild.py
has 743 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Debian Package builder system
.. versionadded:: 2015.8.0
Function installed
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
def installed(name, target="LocalSystem", dmg=False, store=False, app=False, mpkg=False, user=None, onlyif=None,
unless=None, force=False, allow_untrusted=False, version_check=None):
'''
Install a Mac OS Package from a pkg or dmg file, if given a dmg file it
will first be mounted in a temporary location
- 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 call
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
def call(self, low, chunks=None, running=None, retries=1):
'''
Call a state directly with the low data structure, verify data
before processing.
'''
- 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
File nftables.py
has 738 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Support for nftables
'''
from __future__ import absolute_import, print_function, unicode_literals
File thin.py
has 736 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Generate the salt thin tarball from the installed python files
'''
File heat.py
has 734 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Module for handling OpenStack Heat calls
.. versionadded:: 2017.7.0
Function info
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
def info(*packages, **kwargs):
'''
Return a detailed package(s) summary information.
If no packages specified, all packages will be returned.
- 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 merge_tops
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
def merge_tops(self, tops):
'''
Cleanly merge the top files
'''
top = collections.defaultdict(OrderedDict)
- 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
File netconfig.py
has 729 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Network Config
==============
File boto_s3_bucket.py
has 729 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Connection module for Amazon S3 Buckets
.. versionadded:: 2016.3.0
Function shortcut
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
def shortcut(
name,
target,
arguments=None,
working_dir=None,
- 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 recurse
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
def recurse(name,
source,
keep_source=True,
clean=False,
require=None,
- 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 source_list
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
def source_list(source, source_hash, saltenv):
'''
Check the source list and return the source to use
CLI Example:
- 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 create_certificate
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
def create_certificate(
path=None, text=False, overwrite=True, ca_server=None, **kwargs):
'''
Create an X509 certificate.
- 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 container_file_put
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
def container_file_put(name, src, dst, recursive=False, overwrite=False,
mode=None, uid=None, gid=None, saltenv='base',
remote_addr=None,
cert=None, key=None, verify_cert=True):
'''
- 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
File osquery.py
has 724 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
File useradd.py
has 722 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Manage users with the useradd command
.. important::