Skip to content

Commit 183a0b9

Browse files
achalsMwad22
authored andcommitted
Remove default list from the FeatureView constructor (feast-dev#1679)
Signed-off-by: Achal Shah <achals@gmail.com> Signed-off-by: Mwad22 <51929507+Mwad22@users.noreply.github.com>
1 parent eb1da5e commit 183a0b9

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

sdk/python/feast/feature_view.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,16 @@ def __init__(
6565
input: DataSource,
6666
batch_source: Optional[DataSource] = None,
6767
stream_source: Optional[DataSource] = None,
68-
features: List[Feature] = [],
68+
features: List[Feature] = None,
6969
tags: Optional[Dict[str, str]] = None,
7070
online: bool = True,
7171
):
7272
_input = input or batch_source
7373
assert _input is not None
7474

75-
cols = [entity for entity in entities] + [feat.name for feat in features]
75+
_features = features or []
76+
77+
cols = [entity for entity in entities] + [feat.name for feat in _features]
7678
for col in cols:
7779
if _input.field_mapping is not None and col in _input.field_mapping.keys():
7880
raise ValueError(
@@ -83,7 +85,7 @@ def __init__(
8385

8486
self.name = name
8587
self.entities = entities
86-
self.features = features
88+
self.features = _features
8789
self.tags = tags if tags is not None else {}
8890

8991
if isinstance(ttl, Duration):

0 commit comments

Comments
 (0)