Showing 364 of 2,550 total issues
Function print_graph
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
def print_graph(deps_graph, out):
requires = OrderedDict()
build_requires = OrderedDict()
python_requires = set()
build_time_nodes = deps_graph.build_time_nodes()
- 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 loads
has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring. Open
def loads(text):
result = ProfileEnvironment()
for line in text.splitlines():
line = line.strip()
if not line or line.startswith("#"):
- 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 lock_create
has 14 arguments (exceeds 10 allowed). Consider refactoring. Open
def lock_create(self, path, lockfile_out,
Function get_command
has 14 arguments (exceeds 10 allowed). Consider refactoring. Open
def get_command(self, project_file, props_file_path=None, targets=None, upgrade_project=True,
Function install_build_and_test
has 14 arguments (exceeds 10 allowed). Consider refactoring. Open
def install_build_and_test(app, conanfile_abs_path, reference, graph_info,
Function test
has 14 arguments (exceeds 10 allowed). Consider refactoring. Open
def test(self, path, reference, profile_names=None, settings=None, options=None, env=None,
Function cmd_export
has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring. Open
def cmd_export(app, conanfile_path, name, version, user, channel, keep_source,
export=True, graph_lock=None, ignore_dirty=False):
""" Export the recipe
param conanfile_path: the original source directory of the user containing a
conanfile.py
- 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 __cmp__
has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring. Open
def __cmp__(self, other):
if other is None:
return 1
if not isinstance(other, Version):
other = Version(other)
- 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
has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring. Open
def create(lockfiles, revisions_enabled, cwd):
def ref_convert(r):
# Necessary so "build-order" output is usable by install
if "@" not in r:
if "#" in r:
- 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 download
has 13 arguments (exceeds 10 allowed). Consider refactoring. Open
def download(url, filename, verify=True, out=None, retry=None, retry_wait=None, overwrite=False,
Function _expand_require
has 13 arguments (exceeds 10 allowed). Consider refactoring. Open
def _expand_require(self, require, node, graph, check_updates, update, remotes, profile_host,
Function config
has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring. Open
def config(self, *args):
"""
Manages Conan configuration.
Used to edit conan.conf, or install config files.
- 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
Avoid deeply nested control flow statements. Open
if pkg_metadata.remote == remote_name:
pkg_metadata.remote = new_remote_name
Function info
has 12 arguments (exceeds 10 allowed). Consider refactoring. Open
def info(self, reference_or_path, remote_name=None, settings=None, options=None, env=None,
Function _process_file
has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring. Open
def _process_file(directory, filename, config, cache, output, folder):
if filename == "settings.yml":
output.info("Installing settings.yml")
_filecopy(directory, filename, cache.cache_folder)
elif filename == "conan.conf":
- 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 _apply_inner_profile
has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring. Open
def _apply_inner_profile(doc, base_profile):
"""
:param doc: ConfigParser object from the current profile (excluding includes and vars,
and with values already replaced)
- 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
Avoid deeply nested control flow statements. Open
if response.status_code == 404:
raise PackageNotFoundException(pref)
if response.status_code != 200: # Error message is text
Avoid deeply nested control flow statements. Open
if ref.revision != rec_rev:
self._output.warn("Skipping package '%s', it doesn't belong to the"
" current recipe revision" % package_id)
continue
package_revision = metadata.packages[package_id].revision
Avoid deeply nested control flow statements. Open
if pkg_metadata.remote == remote_name:
pkg_metadata.remote = None
Avoid deeply nested control flow statements. Open
if metadata.recipe.remote == renamed:
metadata.recipe.remote = remote_name
for pkg_metadata in metadata.packages.values():