Skip to content

Commit dfc4a18

Browse files
committed
Updating type hints
1 parent df068ea commit dfc4a18

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

python_notion_api/async_api/notion_data_source.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Dict, Generator, List, Optional, TYPE_CHECKING
1+
from typing import Any, Generator, Optional, TYPE_CHECKING
22

33
from pydantic.v1 import BaseModel
44

@@ -28,7 +28,7 @@ class NotionDataSource:
2828

2929
class CreatePageRequest(BaseModel):
3030
parent: ParentObject
31-
properties: Dict[str, PropertyValue]
31+
properties: dict[str, PropertyValue]
3232
cover: Optional[FileObject]
3333

3434
def __init__(self, api: "AsyncNotionAPI", data_source_id: str):
@@ -66,7 +66,7 @@ async def reload(self):
6666
async def query(
6767
self,
6868
filters: Optional[FilterItem] = None,
69-
sorts: Optional[List[Sort]] = None,
69+
sorts: Optional[list[Sort]] = None,
7070
page_limit: Optional[int] = None,
7171
cast_cls=NotionPage,
7272
) -> Generator[NotionPage, None, None]:
@@ -108,13 +108,13 @@ def title(self) -> str:
108108

109109
@property
110110
@ensure_loaded
111-
def properties(self) -> Dict[str, NotionPropertyConfiguration]:
111+
def properties(self) -> dict[str, NotionPropertyConfiguration]:
112112
"""Get all property configurations of the data source."""
113113
return self._properties
114114

115115
@property
116116
@ensure_loaded
117-
def relations(self) -> Dict[str, RelationPropertyConfiguration]:
117+
def relations(self) -> dict[str, RelationPropertyConfiguration]:
118118
"""Get all property configurations of the data source that are
119119
relations.
120120
"""
@@ -126,7 +126,7 @@ def relations(self) -> Dict[str, RelationPropertyConfiguration]:
126126

127127
async def create_page(
128128
self,
129-
properties: Dict[str, Any] = {},
129+
properties: dict[str, Any] = {},
130130
cover_url: Optional[str] = None,
131131
) -> NotionPage:
132132
"""Creates a new page in the Data Source and updates the new page with

0 commit comments

Comments
 (0)