Showing 1,088 of 2,665 total issues
Function _disconnect
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _disconnect(self):
"""
Close socket connection
:return:
"""
- 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_data_per_code_status
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_data_per_code_status(self, raw_data):
data = defaultdict(int)
for code, value in raw_data['total_status_code_count'].items():
code_prefix = code[0]
if code_prefix == '1' or code_prefix == '2' or code == '304':
- 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 load_collectors
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_collectors():
ret = []
entries = get_collector_metadata_entries()
- 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 load_agent_notifications
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_agent_notifications():
ret = []
for repo, path, match in AGENT_NOTIFICATION_SOURCES:
if match and path.exists() and path.is_dir():
- 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 load_exporters
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_exporters():
ret = []
for repo, path, match in EXPORTER_SOURCES:
if match and path.exists() and path.is_dir():
- 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 load_authentications
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_authentications():
ret = []
for repo, path, match in AUTHENTICATION_SOURCES:
if match and path.exists() and path.is_dir():
- 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 load_cloud_notifications
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_cloud_notifications():
ret = []
for repo, path, match in CLOUD_NOTIFICATION_SOURCES:
if match and path.exists() and path.is_dir():
- 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 load_logs
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_logs():
ret = []
for repo, path, match in LOGS_SOURCES:
if match and path.exists() and path.is_dir():
- 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 load_deploy
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_deploy():
ret = []
for repo, path, match in DEPLOY_SOURCES:
if match and path.exists() and path.is_dir():
- 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 too many return
statements within this function. Open
return JSON.parse(data);
Avoid too many return
statements within this function. Open
return def;
Avoid too many return
statements within this function. Open
return function (value) {
return value;
};
Avoid too many return
statements within this function. Open
return value !== 0;
Avoid too many return
statements within this function. Open
return function (value) {
return value / tdivider;
};
Avoid too many return
statements within this function. Open
return function (value) {
return value;
};
Avoid too many return
statements within this function. Open
return this.convertibleUnits[units][x].convert;
Avoid too many return
statements within this function. Open
return this.convertibleUnits[units][desired_units].convert;
Avoid too many return
statements within this function. Open
return function (value) {
return value / tdivider;
};
Avoid too many return
statements within this function. Open
return function (value) {
return value;
};
Avoid too many return
statements within this function. Open
return def;