From 891680bb05e85ea6bb43e7e046b46cbd19e06161 Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Sat, 26 Jul 2025 19:44:11 +0200 Subject: [PATCH] linting --- apps/test/io.py | 22 ++++++++++++++++++++++ compose.yaml | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 apps/test/io.py diff --git a/apps/test/io.py b/apps/test/io.py new file mode 100644 index 0000000..ea38c43 --- /dev/null +++ b/apps/test/io.py @@ -0,0 +1,22 @@ +from typing import Any, Optional + + +class MyIOManager(PolarsParquetIOManager): + def _load_partition_from_path( + self, + context: InputContext, + partition_key: str, + path: "UPath", + backcompat_path: Optional["UPath"] = None, + ) -> Any: + try: + return super()._load_partition_from_path( + context, partition_key, path, backcompat_path + ) + except FileNotFoundError: + # Handle the case where the partition file does not exist + context.log.warning( + f"Partition file not found for key {partition_key} at path {path}. " + "Returning an empty DataFrame." + ) + return None diff --git a/compose.yaml b/compose.yaml index e6668c4..f19980d 100644 --- a/compose.yaml +++ b/compose.yaml @@ -5,4 +5,4 @@ networks: include: - compose.system.yaml - - compose.code.yaml \ No newline at end of file + - compose.code.yaml