Showing 334 of 1,000 total issues
Avoid too many return
statements within this function. Open
return data;
Avoid too many return
statements within this function. Open
if (byteLength !== getByteLength(b)) return false;
Avoid too many return
statements within this function. Open
return elem[ name ];
Avoid too many return
statements within this function. Open
return str(obj)
Avoid too many return
statements within this function. Open
if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
Avoid too many return
statements within this function. Open
if (keys(b).length !== length) return false;
Avoid too many return
statements within this function. Open
return obj()
Avoid too many return
statements within this function. Open
return values(obj);
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return true;
Function _log
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _log(
self,
level,
msg,
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 _make_log_task
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _make_log_task(self, level, msg, *args, **kwargs) -> Task:
"""
Creates an asyncio.Task for a msg if logging is enabled for level.
Returns a dummy task otherwise.
"""
- 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 _log
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _log( # type: ignore
self,
level: LogLevel,
msg: Any,
args: Optional[Tuple[Mapping]],
- 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 format
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def format(self, record: ExtendedLogRecord) -> str: # type: ignore
"""
:type record: aiologger.records.ExtendedLogRecord
"""
msg = dict(self.formatter_fields_for_record(record))
- 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"