🐛 fix(process.py): change input parameter type hint to include Path type

The input parameter now accepts a Path object in addition to a string or dictionary. This improves the flexibility of the function and allows for easier file handling.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-19 14:25:10 -03:00
commit f180fa6f26

View file

@ -133,7 +133,7 @@ def process_graph_cached(data_graph: Dict[str, Any], message: str):
def load_flow_from_json(
input: Union[str, dict], tweaks: Optional[dict] = None, build=True
input: Union[Path, str, dict], tweaks: Optional[dict] = None, build=True
):
"""
Load flow from a JSON file or a JSON object.