"""Provide the ModAction class."""
from typing import TYPE_CHECKING

from .base import PRAWBase

if TYPE_CHECKING:  # pragma: no cover
    from ... import praw


class ModAction(PRAWBase):
    """Represent a moderator action."""

    @property
    def mod(self) -> "praw.models.Redditor":
        """Return the :class:`.Redditor` who the action was issued by."""
        return self._reddit.redditor(self._mod)  # pylint: disable=no-member

    @mod.setter
    def mod(self, value: "praw.models.Redditor"):
        self._mod = value  # pylint: disable=attribute-defined-outside-init

"""Provide the ModAction class."""
from typing import TYPE_CHECKING, Union

from .base import PRAWBase

if TYPE_CHECKING:  # pragma: no cover
    from ... import praw


class ModAction(PRAWBase):
    """Represent a moderator action."""

    @property
    def mod(self) -> "praw.models.Redditor":
        """Return the :class:`.Redditor` who the action was issued by."""
        return self._reddit.redditor(self._mod)  # pylint: disable=no-member

    @mod.setter
    def mod(self, value: Union[str, "praw.models.Redditor"]):
        self._mod = value  # pylint: disable=attribute-defined-outside-init

Add str as a type for mod setter
Add str as a type for mod setter

  """Provide the ModAction class."""
- from typing import TYPE_CHECKING
+ from typing import TYPE_CHECKING, Union
  
  from .base import PRAWBase
  
  if TYPE_CHECKING:  # pragma: no cover
      from ... import praw
  
  
  class ModAction(PRAWBase):
      """Represent a moderator action."""
  
      @property
      def mod(self) -> "praw.models.Redditor":
          """Return the :class:`.Redditor` who the action was issued by."""
          return self._reddit.redditor(self._mod)  # pylint: disable=no-member
  
      @mod.setter
-     def mod(self, value: "praw.models.Redditor"):
+     def mod(self, value: Union[str, "praw.models.Redditor"]):
          self._mod = value  # pylint: disable=attribute-defined-outside-init
  
Add str as a type for mod setter
## Code Before:
"""Provide the ModAction class."""
from typing import TYPE_CHECKING

from .base import PRAWBase

if TYPE_CHECKING:  # pragma: no cover
    from ... import praw


class ModAction(PRAWBase):
    """Represent a moderator action."""

    @property
    def mod(self) -> "praw.models.Redditor":
        """Return the :class:`.Redditor` who the action was issued by."""
        return self._reddit.redditor(self._mod)  # pylint: disable=no-member

    @mod.setter
    def mod(self, value: "praw.models.Redditor"):
        self._mod = value  # pylint: disable=attribute-defined-outside-init

## Instruction:
Add str as a type for mod setter
## Code After:
"""Provide the ModAction class."""
from typing import TYPE_CHECKING, Union

from .base import PRAWBase

if TYPE_CHECKING:  # pragma: no cover
    from ... import praw


class ModAction(PRAWBase):
    """Represent a moderator action."""

    @property
    def mod(self) -> "praw.models.Redditor":
        """Return the :class:`.Redditor` who the action was issued by."""
        return self._reddit.redditor(self._mod)  # pylint: disable=no-member

    @mod.setter
    def mod(self, value: Union[str, "praw.models.Redditor"]):
        self._mod = value  # pylint: disable=attribute-defined-outside-init
