Showing 126 of 199 total issues
Avoid too many return
statements within this function. Open
return state;
Avoid too many return
statements within this function. Open
return {
..._.omit(state, placeholderId),
[action.payload.mdoc._id]: false,
};
Avoid too many return
statements within this function. Open
return setting.factory()
Avoid too many return
statements within this function. Open
return state;
Avoid too many return
statements within this function. Open
return {
...state,
records: {
...state.records,
isLoading: false,
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return join_settings
Avoid too many return
statements within this function. Open
return {
...state,
isPosting: false,
};
Avoid too many return
statements within this function. Open
return state;
Avoid too many return
statements within this function. Open
return {
...state,
[id]: false,
};
Avoid too many return
statements within this function. Open
return {
...state,
[id]: '',
};
Avoid too many return
statements within this function. Open
return calculated_difficulty
Avoid too many return
statements within this function. Open
return {
...state,
isPosting: false,
};
Avoid too many return
statements within this function. Open
return next(iter(setting.range))
Avoid too many return
statements within this function. Open
return {
...state,
[id]: data,
};
Function request
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
pjax.request = async opt => {
const options = {
method: 'get',
push: true,
...opt,
- 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 _parse_dag_json
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _parse_dag_json(dag):
try:
dag = json.decode(dag)
except decoder.JSONDecodeError:
raise error.ValidationError('dag') from 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
Function reducer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function reducer(state = {
rows: [],
items: {},
}, action) {
switch (action.type) {
- 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_exist_node
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _get_exist_node(nodes, node_name):
for category in nodes.values():
assert type(category) is list
for node in category:
if node['name'] == node_name:
- 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"