Skip to content

Clean up _get_asset_impacts #570

@jroman-ak

Description

@jroman-ak

In requests.py the private function _get_asset_impacts defines optional parameters vulnerability_models, measure_calculators and portfolio_measure_calculators that are None by default. At the beginning of the function, it handles the cases where they are not passed by the caller and are indeed None. This handling is redundant because the only caller of _get_asset_impacts is get_asset_impacts which already handles the instantiation of those arguments and passes those instances in the call.

Maybe we could clean up _get_asset_impacts by making those parameters not optional and removing the handling of None values. This would make their handling consistent with hazard_model which is already a non optional argument. The logic in get_asset_impacts would remain as is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions