Skip to content

Commit

Permalink
Fixed the "logging-not-lazy" warnings (#503)
Browse files Browse the repository at this point in the history
* Fixed the warning "logging-not-lazy"

In impact_funcs\base.py

* Fixed the warning in impact_func_set.py

* white space cosmetics

Co-authored-by: Emanuel Schmid <[email protected]>
  • Loading branch information
frqqyy and emanuel-schmid authored Jul 5, 2022
1 parent 3f9b00a commit 2012593
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions climada/entity/impact_funcs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ def from_step_impf(cls, intensity, mdd=(0, 1), paa=(1, 1), impf_id=1):

def set_step_impf(self, *args, **kwargs):
"""This function is deprecated, use ImpactFunc.from_step_impf instead."""
LOGGER.warning("The use of ImpactFunc.set_step_impf is deprecated." +
"Use ImpactFunc.from_step_impf instead.")
LOGGER.warning("The use of ImpactFunc.set_step_impf is deprecated."
" Use ImpactFunc.from_step_impf instead.")
self.__dict__ = ImpactFunc.from_step_impf(*args, **kwargs).__dict__

@classmethod
Expand Down
4 changes: 2 additions & 2 deletions climada/entity/impact_funcs/impact_func_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ def from_excel(cls, file_name, description='', var_names=None):

def read_excel(self, *args, **kwargs):
"""This function is deprecated, use ImpactFuncSet.from_excel instead."""
LOGGER.warning("The use of ImpactFuncSet.read_excel is deprecated." +
"Use ImpactFuncSet.from_excel instead.")
LOGGER.warning("The use of ImpactFuncSet.read_excel is deprecated."
" Use ImpactFuncSet.from_excel instead.")
self.__dict__ = ImpactFuncSet.from_excel(*args, **kwargs).__dict__

@classmethod
Expand Down

0 comments on commit 2012593

Please sign in to comment.