Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datasette(... files=) should not be a required argument #1563

Closed
simonw opened this issue Dec 17, 2021 · 2 comments
Closed

Datasette(... files=) should not be a required argument #1563

simonw opened this issue Dec 17, 2021 · 2 comments

Comments

@simonw
Copy link
Owner

simonw commented Dec 17, 2021

>>> ds = Datasette(memory=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() missing 1 required positional argument: 'files'
>>> ds = Datasette(memory=True, files=[])

I wanted to create an in-memory Datasette for running some tests, no point in forcing me to pass files=[] to do that.

@simonw
Copy link
Owner Author

simonw commented Dec 18, 2021

I should document the usage of this constructor in https://docs.datasette.io/en/stable/internals.html#datasette-class

@simonw
Copy link
Owner Author

simonw commented Dec 18, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant