Skip to content

Commit 55613da

Browse files
committed
feat: Add repr to indicate location and type of cache
1 parent fcb7ef2 commit 55613da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

templateflow/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ def __init__(
5050
)
5151
self.cache = cache
5252

53+
def __repr__(self) -> str:
54+
cache_type = 'DataLad' if self.cache.config.use_datalad else 'S3'
55+
return f'<{self.__class__.__name__}[{cache_type}] cache="{self.cache.config.root}">'
56+
5357
def __getattr__(self, name: str):
5458
name = name.replace('ls_', 'get_')
5559
try:

0 commit comments

Comments
 (0)