Skip to content

Commit

Permalink
fix: explicit typing
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Feb 16, 2024
1 parent 610c01a commit 4012481
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from __future__ import annotations

from typing import Iterator
from typing import Any, Callable, Dict, Iterator, List, Tuple, Union

from attrs import define
from opaque_keys.edx.keys import CourseKey, UsageKey
Expand Down Expand Up @@ -138,6 +138,12 @@ def build_object_tree_with_objecttags(
"""
Returns the object with the tags associated with it.
"""
get_tagged_children: Union[
# _get_course_tagged_object_and_children type
Callable[[LibraryXBlockMetadata, Dict[str, Dict[int, List[Any]]]], Tuple[TaggedContent, None]],
# _get_library_block_tagged_object type
Callable[[UsageKey, Dict[str, Dict[int, List[Any]]]], Tuple[TaggedContent, List[Any]]]
]
if isinstance(content_key, CourseKey):
tagged_content, children = _get_course_tagged_object_and_children(
content_key, object_tag_cache
Expand Down

0 comments on commit 4012481

Please sign in to comment.