|
7 | 7 | from copy import copy as _copy |
8 | 8 | from itertools import islice |
9 | 9 | from plone.api import portal |
10 | | -from plone.api._types import ContainerContext |
| 10 | +from plone.api._types import Container |
11 | 11 | from plone.api._types import Content |
12 | 12 | from plone.api._types import Request |
13 | 13 | from plone.api.exc import InvalidParameterError |
|
46 | 46 | @required_parameters("container", "type") |
47 | 47 | @at_least_one_of("id", "title") |
48 | 48 | def create( |
49 | | - container: Content, |
| 49 | + container: Container, |
50 | 50 | type: str, |
51 | 51 | id: str | None = None, |
52 | 52 | title: str | None = None, |
@@ -184,7 +184,7 @@ def get(path: str | None = None, UID: str | None = None) -> Content | None: |
184 | 184 | @at_least_one_of("target", "id") |
185 | 185 | def move( |
186 | 186 | source: Content, |
187 | | - target: Content | None = None, |
| 187 | + target: Container | None = None, |
188 | 188 | id: str | None = None, |
189 | 189 | safe_id: bool = False, |
190 | 190 | ) -> Content: |
@@ -263,7 +263,7 @@ def rename( |
263 | 263 | @at_least_one_of("target", "id") |
264 | 264 | def copy( |
265 | 265 | source: Content, |
266 | | - target: Content | None = None, |
| 266 | + target: Container | None = None, |
267 | 267 | id: str | None = None, |
268 | 268 | safe_id: bool = False, |
269 | 269 | ) -> Content: |
@@ -833,7 +833,7 @@ def iter_ancestors( |
833 | 833 | else: |
834 | 834 | end = None |
835 | 835 |
|
836 | | - ancestors: Iterator[ContainerContext | RequestContainer] | Any |
| 836 | + ancestors: Iterator[Container | RequestContainer] | Any |
837 | 837 | ancestors = islice(chain, 1, end) |
838 | 838 |
|
839 | 839 | if interface is not None: |
|
0 commit comments