Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasraabe committed Nov 14, 2023
1 parent cff0828 commit 3f6d04d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/_pytask/mark/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from typing import Iterable
from typing import Mapping

from _pytask.mark_utils import get_all_marks
from _pytask.models import CollectionMetadata
from _pytask.typing import is_task_function
from attrs import define
Expand Down Expand Up @@ -122,7 +123,7 @@ def __call__(self, *args: Any, **kwargs: Any) -> MarkDecorator:

def get_unpacked_marks(obj: Callable[..., Any]) -> list[Mark]:
"""Obtain the unpacked marks that are stored on an object."""
mark_list = obj.pytask_meta.markers if hasattr(obj, "pytask_meta") else []
mark_list = get_all_marks(obj)
return normalize_mark_list(mark_list)


Expand Down
2 changes: 1 addition & 1 deletion tests/test_mark_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def func():
func.pytask_meta = CollectionMetadata(markers=markers)

obj, result_markers = remove_marks(func, marker_name)
markers = obj.pytask_meta.markers if hasattr(obj, "pytask_meta") else []
markers = get_all_marks(obj)
assert markers == expected_others
assert result_markers == expected_markers

Expand Down

0 comments on commit 3f6d04d

Please sign in to comment.