scottkleinman / lexos

Development repo for the Lexos API
MIT License
1 stars 0 forks source link

Allow loader to be instantiated with data #3

Closed scottkleinman closed 1 year ago

scottkleinman commented 2 years ago

Currently, you have to load data with two lines:

loader = Loader()
loader.load(data)

There should be an option to do this with loader = Loader(data).

I think this just involves adding

def __init__(self, source: Union[List[Union[Path, str]], Path, str] = None, decode: bool = True):
    ...
    if source:
        self.load(source, decode)
scottkleinman commented 1 year ago

Available in the next merge.