Showing 38 of 240 total issues
Function upload_object
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def upload_object(self, container, obj, contents,
Function create
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, image, flavor,
Function upload_object
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def upload_object(self, container, obj, contents,
Function upload_object
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def upload_object(self, container, obj, contents,
Function create
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, image_id, flavor_id,
Function upload_object
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def upload_object(self, container, obj, contents,
Function create
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, image_id, flavor_id,
Function create
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, image_id, flavor_id,
Function create
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, image, flavor,
Function copy_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def copy_object(self, container, obj, metadata=None,
Function upload_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def upload_object(self, container, obj, content,
Function copy_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def copy_object(self, container, obj, metadata=None,
Function copy_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def copy_object(self, container, obj, metadata=None,
Function copy_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def copy_object(self, container, obj, metadata=None,
Function _first_hook
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _first_hook(req, resp, resource, params):
if resource.req_ids is None:
raise falcon.HTTPBadRequest(title='Append request id failed',
description='Append request id failed')
- 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 test_list_opts
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def test_list_opts(self):
for group, opt_list in opts.list_opts():
if isinstance(group, six.string_types):
self.assertEqual(group, 'DEFAULT')
else:
- 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_list_providers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_list_providers():
# ensure all driver groups have been registered
sections = CONF.list_all_sections()
for section in sections:
CONF.register_group(cfg.OptGroup(section))
- 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 test_load_config_file_to_realize_all_driver
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def test_load_config_file_to_realize_all_driver(self):
CONF(['--config-file',
'calplus/tests/fake_config_file.conf'])
# TODO: Maybe we need remove example group,
# such as: openstack and amazon
- 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"