mirror of
https://github.com/simonw/datasette.git
synced 2026-09-30 05:44:22 +02:00
datasette.fixtures module, closes #2733
https://gist.github.com/simonw/613be79094d491dd08f45e05f4f70691
This commit is contained in:
parent
d3330695fa
commit
1000d50220
10 changed files with 545 additions and 407 deletions
|
|
@ -155,9 +155,15 @@ Column = namedtuple(
|
|||
functions_marked_as_documented = []
|
||||
|
||||
|
||||
def documented(fn):
|
||||
functions_marked_as_documented.append(fn)
|
||||
return fn
|
||||
def documented(fn=None, *, label=None):
|
||||
def decorate(fn):
|
||||
fn._datasette_docs_label = label or "internals_utils_{}".format(fn.__name__)
|
||||
functions_marked_as_documented.append(fn)
|
||||
return fn
|
||||
|
||||
if fn is None:
|
||||
return decorate
|
||||
return decorate(fn)
|
||||
|
||||
|
||||
@documented
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue