diff --git a/daft/filesystem.py b/daft/filesystem.py index 86849b66c5..b675c45ee4 100644 --- a/daft/filesystem.py +++ b/daft/filesystem.py @@ -2,7 +2,6 @@ import dataclasses import pathlib -import string import sys import urllib.parse from collections import defaultdict @@ -105,7 +104,7 @@ def get_protocol_from_path(path: str) -> str: parsed_scheme = parsed_scheme.lower() if parsed_scheme == "" or parsed_scheme is None: return "file" - if sys.platform == "win32" and len(parsed_scheme) == 1 and ('a' <= parsed_scheme) and (parsed_scheme <= 'z'): + if sys.platform == "win32" and len(parsed_scheme) == 1 and ("a" <= parsed_scheme) and (parsed_scheme <= "z"): return "file" return parsed_scheme diff --git a/src/daft-io/src/lib.rs b/src/daft-io/src/lib.rs index 4f772ddee7..8c226b5255 100644 --- a/src/daft-io/src/lib.rs +++ b/src/daft-io/src/lib.rs @@ -251,7 +251,9 @@ fn parse_url(input: &str) -> Result<(SourceType, Cow<'_, str>)> { "az" | "abfs" => Ok((SourceType::AzureBlob, fixed_input)), "gcs" | "gs" => Ok((SourceType::GCS, fixed_input)), #[cfg(target_env = "msvc")] - _ if scheme.len() == 1 && ("a" <= scheme.as_str() && (scheme.as_str() <= "z")) => Ok((SourceType::File, Cow::Owned(format!("file://{input}")))), + _ if scheme.len() == 1 && ("a" <= scheme.as_str() && (scheme.as_str() <= "z")) => { + Ok((SourceType::File, Cow::Owned(format!("file://{input}")))) + } _ => Err(Error::NotImplementedSource { store: scheme }), } }