Skip to content

Commit ae22e64

Browse files
author
Tom McCormick
committed
fix linting
1 parent 1b6f981 commit ae22e64

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

pyiceberg/io/pyarrow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ def __init__(self, properties: Properties = EMPTY_DICT):
389389
@staticmethod
390390
def parse_location(location: str) -> Tuple[str, str, str]:
391391
"""Return (scheme, netloc, path) for the given location.
392+
392393
Uses environment variables DEFAULT_SCHEME and DEFAULT_NETLOC
393394
if scheme/netloc are missing.
394395
"""

tests/io/test_pyarrow.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2639,22 +2639,24 @@ def test_retry_strategy_not_found() -> None:
26392639
with pytest.warns(UserWarning, match="Could not initialize S3 retry strategy: pyiceberg.DoesNotExist"):
26402640
io.new_input("s3://bucket/path/to/file")
26412641

2642-
def test_parse_location_environment_defaults():
2642+
2643+
def test_parse_location_environment_defaults() -> None:
26432644
"""Test that parse_location uses environment variables for defaults."""
2644-
from pyiceberg.io.pyarrow import PyArrowFileIO
26452645
import os
2646-
2646+
2647+
from pyiceberg.io.pyarrow import PyArrowFileIO
2648+
26472649
# Test with default environment (no env vars set)
26482650
scheme, netloc, path = PyArrowFileIO.parse_location("/foo/bar")
26492651
assert scheme == "file"
26502652
assert netloc == ""
26512653
assert path == "/foo/bar"
2652-
2654+
26532655
try:
26542656
# Test with environment variables set
26552657
os.environ["DEFAULT_SCHEME"] = "scheme"
26562658
os.environ["DEFAULT_NETLOC"] = "netloc:8000"
2657-
2659+
26582660
scheme, netloc, path = PyArrowFileIO.parse_location("/foo/bar")
26592661
assert scheme == "scheme"
26602662
assert netloc == "netloc:8000"
@@ -2673,4 +2675,4 @@ def test_parse_location_environment_defaults():
26732675
if "DEFAULT_SCHEME" in os.environ:
26742676
del os.environ["DEFAULT_SCHEME"]
26752677
if "DEFAULT_NETLOC" in os.environ:
2676-
del os.environ["DEFAULT_NETLOC"]
2678+
del os.environ["DEFAULT_NETLOC"]

0 commit comments

Comments
 (0)