Showing 9,400 of 17,590 total issues
Function get_url
has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring. Open
def get_url(self, url, dest, makedirs=False, saltenv='base',
no_cache=False, cachedir=None, source_hash=None):
'''
Get a single file from a URL.
'''
- 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 __init__.py
has 951 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
This module provides the point of entry to SPM, the Salt Package Manager
.. versionadded:: 2015.8.0
File ebuildpkg.py
has 950 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Support for Portage
.. important::
File grafana4.py
has 950 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Module for working with the Grafana v4 API
.. versionadded:: 2017.7.0
File state.py
has 946 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Create ssh executor system
'''
from __future__ import absolute_import, print_function
Function Modernizr
has a Cognitive Complexity of 115 (exceeds 5 allowed). Consider refactoring. Open
window.Modernizr = (function( window, document, undefined ) {
var version = '2.6.2',
Modernizr = {},
- 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 team_present
has a Cognitive Complexity of 114 (exceeds 5 allowed). Consider refactoring. Open
def team_present(
name,
description=None,
repo_names=None,
privacy='secret',
- 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 beacon
has a Cognitive Complexity of 114 (exceeds 5 allowed). Consider refactoring. Open
def beacon(config):
'''
Watch the configured files
Example Config
- 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 restartcheck
has a Cognitive Complexity of 112 (exceeds 5 allowed). Consider refactoring. Open
def restartcheck(ignorelist=None, blacklist=None, excludepid=None, **kwargs):
'''
Analyzes files openeded by running processes and seeks for packages which need to be restarted.
Args:
- 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 request_instance
has a Cognitive Complexity of 112 (exceeds 5 allowed). Consider refactoring. Open
def request_instance(vm_=None, call=None):
'''
Put together all of the information necessary to request an instance on EC2,
and then fire off the request the instance.
- 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 smartos.py
has 919 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Management of SmartOS Standalone Compute Nodes
:maintainer: Jorge Schrauwen <sjorge@blackdot.be>
File win.py
has 914 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Windows specific utility functions, this module should be imported in a try,
except block because it is only applicable on Windows platforms.
File netbox.py
has 914 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
NetBox
======
Function managed
has a Cognitive Complexity of 111 (exceeds 5 allowed). Consider refactoring. Open
def managed(name, roles=None, profiles=None, authorizations=None):
'''
Manage RBAC properties for user
name : string
- 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 present
has a Cognitive Complexity of 111 (exceeds 5 allowed). Consider refactoring. Open
def present(alias, passwd, usrgrps, medias=None, password_reset=False, **kwargs):
'''
Ensures that the user exists, eventually creates new user.
NOTE: use argument firstname instead of name to not mess values with name from salt sls.
- 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 remove
has a Cognitive Complexity of 111 (exceeds 5 allowed). Consider refactoring. Open
def remove(name=None, pkgs=None, **kwargs):
'''
Remove the passed package(s) from the system using winrepo
.. versionadded:: 0.16.0
- 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 elasticsearch.py
has 908 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Elasticsearch - A distributed RESTful search and analytics server
Module to provide Elasticsearch compatibility to Salt
Function process_results
has a Cognitive Complexity of 110 (exceeds 5 allowed). Consider refactoring. Open
def process_results(self, rows):
'''
This function takes a list of database results and iterates over,
merging them into a dict form.
'''
- 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 pip_state.py
has 906 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
'''
Installation of Python Packages Using pip
=========================================
Function handle_func
has a Cognitive Complexity of 109 (exceeds 5 allowed). Consider refactoring. Open
def handle_func(self, multiprocessing_enabled, func, data):
'''
Execute this method in a multiprocess or thread
'''
if salt.utils.platform.is_windows() \
- 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"