From 490be2ffcbebda9bcb0eac74f8e118a4aeb7391f Mon Sep 17 00:00:00 2001 From: Jason Cameron Date: Thu, 23 Nov 2023 12:00:13 -0500 Subject: [PATCH] updated comments/types for Ba --- core/api/views/objects/base.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/api/views/objects/base.py b/core/api/views/objects/base.py index 146a49d3..79273141 100644 --- a/core/api/views/objects/base.py +++ b/core/api/views/objects/base.py @@ -1,11 +1,13 @@ -from typing import List +from typing import List, Literal class BaseProvider: - allow_list: bool = True - allow_new: bool = True - kind: str = "" - listing_filters_ignore: List[str] = [] + allow_list: bool = True # Is the view able to list the model's objects. (e.g. /user would list all users + allow_new: bool = True # Is the provider able to create a new object. + kind: Literal["list", "new", "single", "retrieve"] # type of view + listing_filters_ignore: List[ + str] = [] # don't treat the passed in params as a listing filter but instead as a param for the view. def __init__(self, request): self.request = request +