Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
samster25 committed Sep 24, 2023
1 parent 563c1a9 commit 5070e68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions daft/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import dataclasses
import pathlib
import string
import sys
import urllib.parse
from collections import defaultdict
Expand Down Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion src/daft-io/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
}
}
Expand Down

0 comments on commit 5070e68

Please sign in to comment.