Skip to content

Commit

Permalink
CF Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
N-o-Z committed Dec 5, 2023
1 parent 448674d commit 13869e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions clients/python-wrapper/lakefs/import_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import lakefs_sdk

from lakefs.models import ImportStatus, _OBJECT, _PREFIX
from lakefs.models import ImportStatus, _OBJECT, _COMMON_PREFIX
from lakefs.client import Client, DEFAULT_CLIENT
from lakefs.exceptions import ImportManagerException, api_exception_handler

Expand Down Expand Up @@ -54,7 +54,8 @@ def prefix(self, object_store_uri: str, destination: str) -> ImportManager:
:param destination: The destination prefix relative to the branch
:return: The ImportManager instance (self) after update, to allow operations chaining
"""
self.sources.append(lakefs_sdk.ImportLocation(type=_PREFIX, path=object_store_uri, destination=destination))
self.sources.append(
lakefs_sdk.ImportLocation(type=_COMMON_PREFIX, path=object_store_uri, destination=destination))
return self

def object(self, object_store_uri: str, destination: str) -> ImportManager:
Expand Down
2 changes: 1 addition & 1 deletion clients/python-wrapper/lakefs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from lakefs.namedtuple import LenientNamedTuple

_PREFIX = "common_prefix"
_COMMON_PREFIX = "common_prefix"
_OBJECT = "object"


Expand Down
3 changes: 2 additions & 1 deletion clients/python-wrapper/lakefs/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def objects(self,
delimiter: Optional[str] = None,
**kwargs) -> Generator[StoredObject | CommonPrefix]:
"""
Returns an object generator for this reference
Returns an object generator for this reference, the generator can yield either a StoredObject or a CommonPrefix
object depending on the listing parameters provided.
:param max_amount: Stop showing changes after this amount
:param after: Return items after this value
Expand Down

0 comments on commit 13869e6

Please sign in to comment.