Last analyzed c95462c 7 months ago
Default analysis branch is
`if` statements can be merged PTC-W0048
Anti-pattern
Python
7 months ago7 months old
Consider merging collapsible if statements
wltp/engine.py Seen 7 months ago
118
119    ## Accept 2-columns if column-names were unamed.
120    #
121    elif wot.shape[1] == 2:122        if tuple(wot.columns) == (0, 1):
123            wot.columns = [w.n, w.p]
124            log.warning("Assuming the 2-column WOT to be: %s, %s", *wot.columns)
Consider merging collapsible if statements
wltp/datamodel.py Seen 7 months ago
576            # if not additional_properties and not set(cols) <= set(['v','slide']):
577            #     yield ValidationError('Unexpected columns!')
578
579            if forced_cycle.shape[1] == 1:580                if cols[0] == 1:
581                    log.warning(
582                        "Assuming the unamed single-column to be the velocity_profile(%s).",
Consider merging collapsible if statements
wltp/autograph.py Seen 7 months ago
395                    <decors>    (dict)
396    """
397    for dmn in astuple(domain, "domain"):
398        if hasattr(fn, "_autograph"):399            if dmn in fn._autograph:
400                return fn._autograph[dmn]
401    return default