-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new implementation of get_filtered_tags
- Loading branch information
1 parent
8ba0043
commit 4184c05
Showing
8 changed files
with
583 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
""" | ||
Data models used by openedx-tagging | ||
""" | ||
from __future__ import annotations | ||
|
||
from typing import TypedDict | ||
|
||
|
||
class TagData(TypedDict): | ||
""" | ||
Data about a single tag. Many of the tagging API methods return Django | ||
QuerySets that resolve to these dictionaries. | ||
Even though the data will be in this same format, it will not necessarily | ||
be an instance of this class but rather a plain dictionary. This is more a | ||
type than a class. | ||
""" | ||
value: str | ||
external_id: str | None | ||
child_count: int | ||
depth: int | ||
parent_value: str | None | ||
# Note: usage_count may not actually be present but there's no way to indicate that w/ python types at the moment | ||
usage_count: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.