Skip to content

Commit

Permalink
fix: cleaning some types
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Feb 16, 2024
1 parent 4ad87c2 commit 5caf952
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from __future__ import annotations

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

from attrs import define
from opaque_keys.edx.keys import CourseKey, UsageKey
Expand Down Expand Up @@ -140,9 +140,9 @@ def build_object_tree_with_objecttags(
"""
get_tagged_children: Union[
# _get_course_tagged_object_and_children type
Callable[[LibraryXBlockMetadata, Dict[str, Dict[int, List[Any]]]], Tuple[TaggedContent, None]],
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]]]
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(
Expand All @@ -167,8 +167,6 @@ def build_object_tree_with_objecttags(
continue

for child in block_children:
child_children: list | None

tagged_child, child_children = get_tagged_children(child, object_tag_cache)
tagged_block.children.append(tagged_child)
blocks.append((tagged_child, child_children))
Expand Down

0 comments on commit 5caf952

Please sign in to comment.