Skip to content

Commit a71c816

Browse files
committed
fix: standardize path formatting in FileSyncer logs
1 parent c239f3d commit a71c816

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/humanloop/sync/file_syncer.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def _pull_directory(
258258

259259
while True:
260260
try:
261-
logger.debug(f"`{path}`: Requesting page {page} of files")
261+
logger.debug(f"{path or '(root)'}: Requesting page {page} of files")
262262
response = self.client.files.list_files(
263263
type=list(self.SERIALIZABLE_FILE_TYPES),
264264
page=page,
@@ -269,10 +269,10 @@ def _pull_directory(
269269
)
270270

271271
if len(response.records) == 0:
272-
logger.debug(f"Finished reading files for path `{path}`")
272+
logger.debug(f"Finished reading files for path {path or '(root)'}")
273273
break
274274

275-
logger.debug(f"`{path}`: Read page {page} containing {len(response.records)} files")
275+
logger.debug(f"{path or '(root)'}: Read page {page} containing {len(response.records)} files")
276276

277277
# Process each file
278278
for file in response.records:
@@ -365,7 +365,7 @@ def pull(self, path: Optional[str] = None, environment: Optional[str] = None) ->
365365
try:
366366
if api_path is None:
367367
# Pull all from root
368-
logger.debug("Pulling all files from root")
368+
logger.debug("Pulling all files from (root)")
369369
successful_files, failed_files = self._pull_directory(
370370
path=None,
371371
environment=environment,
@@ -380,7 +380,7 @@ def pull(self, path: Optional[str] = None, environment: Optional[str] = None) ->
380380
successful_files = []
381381
failed_files = [api_path]
382382
else:
383-
logger.debug(f"Pulling directory: {api_path}")
383+
logger.debug(f"Pulling directory: {api_path or '(root)'}")
384384
successful_files, failed_files = self._pull_directory(api_path, environment)
385385

386386
# Clear the cache at the end of each pull operation

0 commit comments

Comments
 (0)