Showing 89 of 104 total issues
Function __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, v_deprecate=None, v_remove=None, v_current=None, details=""):
"""Decorator to mark a function or class as deprecated. Issue warning when the function is
called or the class is instantiated, and add a warning to the docstring. The optional
`details` argument will be appended to the deprecation message and the docstring
- 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 inverse_transform
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def inverse_transform(self, data_t):
"""Inverse transform samples from the warped space back to the original space
Parameters
----------
- 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 Categorical(dimension, **kwargs)
Avoid too many return
statements within this function. Open
return Real(*dimension, **kwargs)
Avoid too many return
statements within this function. Open
return obj
Avoid too many return
statements within this function. Open
return (tuple(pd.util.hash_pandas_object(obj, index=True)), tuple(obj.columns))
Avoid too many return
statements within this function. Open
return Real(*dimension, **kwargs)
Avoid too many return
statements within this function. Open
return list(obj)
Avoid too many return
statements within this function. Open
return Categorical(dimension, **kwargs)
Avoid too many return
statements within this function. Open
return (key, value)
Function visit_feature_engineer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def visit_feature_engineer(path, key, value):
"""Helper to be used within a `visit` function intended for a `remap`-like function
Parameters
----------
- 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_keras_attr
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_keras_attr(model, attr, max_depth=3, default=sentinel_default_value):
"""Retrieve specific Keras model attributes safely across different versions of Keras
Parameters
----------
- 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 __call__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __call__(cls, *args, **kwargs):
if getattr(G, "use_dummy_tracer", False) is True:
space = (Real, Integer, Categorical)
_args = [_ if not isinstance(_, space) else _.bounds[0] for _ in args]
_kwargs = {k: v if not isinstance(v, space) else v.bounds[0] for k, v in kwargs.items()}
- 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 __init__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, v_str: str):
"""Parse and compare HyperparameterHunter version strings
Comparisons must be performed with a valid version string or another `HHVersion` instance.
- 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_keras_params
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def validate_keras_params(self):
"""Ensure provided input parameters are properly formatted"""
#################### Check Keras Import Hooks ####################
necessary_import_hooks = ["keras_layer"]
for hook in necessary_import_hooks:
- 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 add_time_to_content
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def add_time_to_content(content, add_time=False):
"""Construct a string containing the original `content`, in addition to the current time
Parameters
----------
- 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 keras_initializer_to_dict
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def keras_initializer_to_dict(initializer):
try:
#################### Descendants of `VarianceScaling` ####################
previous_frame = getattr(initializer, "__hh_previous_frame")
except AttributeError:
- 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 evaluate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def evaluate(self, data_type, target, prediction, return_list=False, dry_run=False):
"""Apply metric(s) to the given data to calculate the value of the `prediction`
Parameters
----------
- 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 evaluations_to_columns
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def evaluations_to_columns(
evaluation: Dict[str, Optional[OrderedDict]], decimals=10
) -> List[Tuple[str, Number]]:
"""Convert the results of :meth:`metrics.ScoringMixIn.evaluate` to a pd.DataFrame-ready format
- 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 _set_direction
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _set_direction(self, direction):
"""Ensure provided `direction` is valid and inferred if necessary
Parameters
----------
- 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"