mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
DOC: Add docstring for validate_model.
This commit is contained in:
parent
a45b8a0c67
commit
70eb9e219f
@ -27,6 +27,12 @@ def sort_key(model):
|
||||
|
||||
|
||||
def validate_model(model, expect_content):
|
||||
"""
|
||||
Validate a model returned by a ContentsManager method.
|
||||
|
||||
If expect_content is True, then we expect non-null entries for 'content'
|
||||
and 'format'.
|
||||
"""
|
||||
required_keys = {
|
||||
"name"
|
||||
, "path"
|
||||
|
Loading…
Reference in New Issue
Block a user