Skip to content

Commit

Permalink
cleaner annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
bandophahita committed Oct 23, 2023
1 parent df2f4b9 commit 673fc6e
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions screenpy/actions/silently.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

import types
from typing import Any, TypeVar, Union, overload
from typing import Any, TypeVar

from hamcrest.core.base_matcher import Matcher

Expand All @@ -15,29 +15,7 @@
T = TypeVar("T")


T_duck = Union[
Answerable,
Performable,
Resolvable,
]


@overload
def Silently(duck: Performable) -> Performable:
...


@overload
def Silently(duck: Answerable) -> Answerable:
...


@overload
def Silently(duck: Resolvable) -> Resolvable:
...


def Silently(duck: T_duck) -> T_duck:
def Silently(duck: T) -> T:
"""Silence the duck.
Any Performable, Answerable, or Resolvable wrapped in Silently will not be
Expand Down

0 comments on commit 673fc6e

Please sign in to comment.