Showing 376 of 566 total issues
Function echo
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def echo(socket, address):
printl('New connection from %s:%s' % address)
(ip, port) = address
data = 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
Method onPostExecute
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected void onPostExecute(ByteBuffer result) {
synchronized (this) {
if(result != null && result.capacity() > 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
Function __viable_source_types_real
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def __viable_source_types_real (target_type):
""" Returns a list of source type which can possibly be converted
to 'target_type' by some chain of generator invocation.
More formally, takes all generators for 'target_type' 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 toolset_tag
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def toolset_tag(name, target_type, prop_set):
tag = ''
properties = prop_set.raw()
tools = prop_set.get('<toolset>')
- 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 process_file
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def process_file(file, outfile,key,encrypter):
# Open file as file object and read to string
ifile = open(file, 'r')
if os.path.exists(outfile):
os.remove(outfile)
- 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 send_individualized_message
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def send_individualized_message (branch, person, maintainers):
# There are several states we could be in:
# 0 Initial state. Eat everything up to the "NNN failures in MMM
# libraries" line
# 1 Suppress output within this library
- 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 composeEmail
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def composeEmail(self, report):
"""
Composes an e-mail to this maintainer with information about
the failures in his or her libraries, omitting those that come
from "broken" platforms. Returns the e-mail text if a message
- 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 build_system.py
has 336 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Status: mostly ported. Missing is --out-xml support, 'configure' integration
# and some FIXME.
# Base revision: 64351
# Copyright 2003, 2005 Dave Abrahams
Method tabPage2_Enter
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void tabPage2_Enter(object sender, EventArgs e)
{ // Properties tab shows distribution's mean, mode, median...
try
{ // Show chosen distribution name, and parameter names & values.
int i = distribution.SelectedIndex;
Function project
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def project(self, *args):
jamfile_module = self.registry.current().project_module()
attributes = self.registry.attributes(jamfile_module)
- 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
CPlusPlusTranslator
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class CPlusPlusTranslator(litre.LitreTranslator):
_exposed_attrs = ['compile', 'test', 'ignore', 'match_stdout', 'stack', 'config'
, 'example', 'prefix', 'preprocessors', 'litre_directory',
'litre_translator', 'includes', 'build', 'jam_prefix',
Function send_boost_developers_message
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def send_boost_developers_message(branch, maintainers, failing_libraries):
to_line = 'boost@lists.boost.org'
from_line = 'Douglas Gregor <dgregor@osl.iu.edu>'
message = """From: Douglas Gregor <dgregor@osl.iu.edu>
- 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 expand_composites
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def expand_composites (properties):
""" Expand all composite properties in the set so that all components
are explicitly expressed.
"""
explicit_features = set(p.feature() for p in properties)
- 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 process_explicit_toolset_requests
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def process_explicit_toolset_requests():
extra_properties = []
option_toolsets = [e for option in b2.util.regex.transform(sys.argv, "^--toolset=(.*)$")
- 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 benews-srv.py
has 314 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/env python
"""Simple server that listens on port 6954 and replies with a bson encoded news
Connect to it with:
nc localhost 6954
File report.py
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright (c) MetaCommunications, Inc. 2003-2004
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
File property.py
has 312 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Status: ported, except for tests and --abbreviate-paths.
# Base revision: 64070
#
# Copyright 2001, 2002, 2003 Dave Abrahams
# Copyright 2006 Rene Rivera
Function set
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def set(self, attribute, specification, exact=False):
"""Set the named attribute from the specification given by the user.
The value actually set may be different."""
if exact:
- 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 __construct_really
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def __construct_really (project, name, target_type, prop_set, sources):
""" Attempts to construct target by finding viable generators, running them
and selecting the dependency graph.
"""
viable_generators = find_viable_generators (target_type, prop_set)
- 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 init
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def init(version = None, command = None, options = None):
"""
Initializes the gcc toolset for the given version. If necessary, command may
be used to specify where the compiler is located. The parameter 'options' is a
space-delimited list of options, each one specified as
- 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"