Showing 3,918 of 3,918 total issues
Avoid too many return
statements within this function. Open
return PreprocessedColumn.apply(list_format)
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return self._left(metric or x) and self._right(metric or x) # type: ignore
Avoid too many return
statements within this function. Open
return Predicate(Relation._not, right=right, component=right._component), i
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return result
Avoid too many return
statements within this function. Open
return False
Avoid too many return
statements within this function. Open
return self._left(metric or x) or self._right(metric or x) # type: ignore
Avoid too many return
statements within this function. Open
return LiteralGetter(float(token[i])), i + 1
Avoid too many return
statements within this function. Open
return x > value
Avoid too many return
statements within this function. Open
return Predicate(Relation.geq, value, component=component), i
Avoid too many return
statements within this function. Open
return PreprocessedColumn.apply(list_format)
Avoid too many return
statements within this function. Open
return x < value
Avoid too many return
statements within this function. Open
return self._udf(metric or x) # type: ignore
Avoid too many return
statements within this function. Open
return lambda x: x <= value # type: ignore
Avoid too many return
statements within this function. Open
return Predicate(Relation.leq, value, component=component), i
Avoid too many return
statements within this function. Open
return Predicate(Relation.greater, value, component=component), i
Function is_k_item_relevant
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def is_k_item_relevant(self, row: pd.core.series.Series, k: int) -> int:
if self.convert_non_numeric:
return 1 if row[self.prediction_column][k - 1] in row[self.target_column] else 0
else:
index_ki = row[self.prediction_column].index(k)
- 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 _validate_timestamp
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _validate_timestamp(timestamp: Union[date, datetime, pd.Timestamp, str]) -> datetime:
if isinstance(timestamp, pd.Timestamp):
return timestamp.to_pydatetime()
if isinstance(timestamp, str):
try:
- 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 _histogram_from_sketch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _histogram_from_sketch(
sketch: kll_doubles_sketch,
max_buckets: Optional[int] = None,
avg_per_bucket: Optional[float] = None,
min_n_buckets: Optional[int] = 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"