Skip to content

Commit

Permalink
typings
Browse files Browse the repository at this point in the history
  • Loading branch information
IIaKyJIuH authored and aPovidlo committed Nov 22, 2023
1 parent 9a770e0 commit 8c793bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def __init__(self, params: Optional[OperationParameters] = None):
'handle_unknown': 'ignore'
}
self.encoder = OneHotEncoder(**{**default_params, **self.params.to_dict()})
self.categorical_ids = None
self.non_categorical_ids = None
self.encoded_ids = None
self.new_numerical_idx = None
self.categorical_ids: List[int] = []
self.non_categorical_ids: List[int] = []
self.encoded_ids: List[int] = []
self.new_numerical_idx: List[int] = []

def fit(self, input_data: InputData):
""" Method for fit encoder with automatic determination of categorical features
Expand Down Expand Up @@ -104,8 +104,8 @@ def __init__(self, params: Optional[OperationParameters] = None):
super().__init__(params)
# LabelEncoder has no parameters
self.encoders = {}
self.categorical_ids: List[int] = None
self.non_categorical_ids: List[int] = None
self.categorical_ids: List[int] = []
self.non_categorical_ids: List[int] = []

def fit(self, input_data: InputData):
feature_type_ids = input_data.supplementary_data.col_type_ids['features']
Expand Down
2 changes: 1 addition & 1 deletion fedot/core/operations/operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, operation_type: str, **kwargs):
self.operation_type = operation_type

self._eval_strategy = None
self.operations_repo: OperationTypesRepository = None
self.operations_repo: Optional[OperationTypesRepository] = None
self.fitted_operation = None

self.log = default_log(self)
Expand Down

0 comments on commit 8c793bb

Please sign in to comment.