refactoring article context building
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from typing import TypedDict
|
||||
from __future__ import annotations
|
||||
from typing import TypedDict, List
|
||||
|
||||
|
||||
class ArticleConfig(TypedDict):
|
||||
@@ -12,15 +13,27 @@ class ArticleContext(TypedDict):
|
||||
slug: str
|
||||
name: str
|
||||
url: str
|
||||
link: str
|
||||
date: str
|
||||
iso_date: str
|
||||
author: str
|
||||
|
||||
|
||||
translations: List[ArticleTranslationContext]
|
||||
children: List[ArticleContext]
|
||||
linked: List[ArticleContext]
|
||||
related: List[ArticleContext]
|
||||
|
||||
|
||||
class ArticleTranslationContext(TypedDict):
|
||||
slug: str
|
||||
name: str
|
||||
url: str
|
||||
link: str
|
||||
date: str
|
||||
iso_date: str
|
||||
author: str
|
||||
|
||||
translations: List[ArticleTranslationContext]
|
||||
children: List[ArticleTranslationContext]
|
||||
linked: List[ArticleTranslationContext]
|
||||
related: List[ArticleTranslationContext]
|
||||
|
||||
Reference in New Issue
Block a user