Skip to content

Commit cd939c7

Browse files
author
Tom McCormick
committed
fix linting
1 parent ae6cc0d commit cd939c7

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

pyiceberg/io/pyarrow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ def __init__(self, properties: Properties = EMPTY_DICT):
394394
@staticmethod
395395
def parse_location(location: str) -> Tuple[str, str, str]:
396396
"""Return (scheme, netloc, path) for the given location.
397+
397398
Uses environment variables DEFAULT_SCHEME and DEFAULT_NETLOC
398399
if scheme/netloc are missing.
399400
"""

tests/io/test_pyarrow.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,21 +2786,23 @@ def _expected_batch(unit: str) -> pa.RecordBatch:
27862786
assert _expected_batch("ns" if format_version > 2 else "us").equals(actual_result)
27872787

27882788
def test_parse_location_environment_defaults():
2789+
27892790
"""Test that parse_location uses environment variables for defaults."""
2790-
from pyiceberg.io.pyarrow import PyArrowFileIO
27912791
import os
2792-
2792+
2793+
from pyiceberg.io.pyarrow import PyArrowFileIO
2794+
27932795
# Test with default environment (no env vars set)
27942796
scheme, netloc, path = PyArrowFileIO.parse_location("/foo/bar")
27952797
assert scheme == "file"
27962798
assert netloc == ""
27972799
assert path == "/foo/bar"
2798-
2800+
27992801
try:
28002802
# Test with environment variables set
28012803
os.environ["DEFAULT_SCHEME"] = "scheme"
28022804
os.environ["DEFAULT_NETLOC"] = "netloc:8000"
2803-
2805+
28042806
scheme, netloc, path = PyArrowFileIO.parse_location("/foo/bar")
28052807
assert scheme == "scheme"
28062808
assert netloc == "netloc:8000"

0 commit comments

Comments
 (0)