Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
Change default DataContainer type to Any
Browse files Browse the repository at this point in the history
  • Loading branch information
39bytes authored and itsjoeoui committed Aug 18, 2023
1 parent 68debce commit 75f76b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flojoy/data_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def find_closest_match(given_str: str, available_str: list[str]):
"Scalar",
"Surface",
"Vector",
"Any",
"ParametricDataFrame",
"ParametricGrayscale",
"ParametricImage",
Expand Down Expand Up @@ -168,7 +169,7 @@ def _ndarrayify(
)

def __init__( # type:ignore
self, type: DCType = "OrderedPair", **kwargs: DCKwargsValue
self, type: DCType = "Any", **kwargs: DCKwargsValue
):
self.type = type
for k, v in kwargs.items():
Expand Down Expand Up @@ -235,6 +236,9 @@ def __build_error_text(self, key: str, data_type: str, available_keys: list[str]

def validate(self):
dc_type = self.type
if dc_type == "Any":
return

if dc_type not in self.allowed_types:
closest_type = find_closest_match(dc_type, self.allowed_types)
helper_text = (
Expand Down

0 comments on commit 75f76b5

Please sign in to comment.