Skip to content

FileSystemStoreBackend.__repr__ should not return a string #764

@lesteve

Description

@lesteve

Something that tripped me up when working on #746, is that FileSystemStoreBackend.__repr__ makes it look like a string. I could not find a good reason for this. Do you remember something about this @aabadie?

Here is a snippet to show what I mean:

In [1]: from joblib import Memory

In [2]: mem = Memory('/tmp/test')

In [3]: mem.store_backend
Out[3]: /tmp/test/joblib

When I was debugging I lost at least one hour until I thought of doing type(mem.store_backend) ...

Also slightly less important but:

from joblib._store_backends import FileSystemStoreBackend
backend = FileSystemStoreBackend()
backend  # Exception in __repr__ AttributeError: 'FileSystemStoreBackend' object has no attribute 'location'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions