Skip to content

Commit

Permalink
Fix type hints for DateFlagsTransform._get_column_name and `TimeFla…
Browse files Browse the repository at this point in the history
…gsTransform._get_column_name` (#428)

* Refactor DateFlagsTransform, TimeFlagsTransform so they can generate column names like FourierTransform, update tests

* Refactor LagTransform so it can generate column names like FourierTransform, update tests

* Reformat code

* Update notebook with new columns naming

* Update changelog

* Add type hints for _get_column_name

* Add type hints for _get_column_name
  • Loading branch information
Mr-Geekman authored Dec 29, 2021
1 parent a85d162 commit 0e1f7c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etna/transforms/datetime_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def __init__(
special_days_in_month=(),
)

def _get_column_name(self, feature_name) -> str:
def _get_column_name(self, feature_name: str) -> str:
if self.out_column is None:
init_parameters = deepcopy(self._empty_parameters)
init_parameters[feature_name] = self.__dict__[feature_name]
Expand Down Expand Up @@ -357,7 +357,7 @@ def __init__(
one_third_day_number=False,
)

def _get_column_name(self, feature_name) -> str:
def _get_column_name(self, feature_name: str) -> str:
if self.out_column is None:
init_parameters = deepcopy(self._empty_parameters)
init_parameters[feature_name] = self.__dict__[feature_name]
Expand Down

0 comments on commit 0e1f7c1

Please sign in to comment.