<commit_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<commit_msg>Add str as a type for mod setter<commit_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
{'fraction_non_alphanumeric': 0.12579617834394904, 'fraction_numerical': 0.0, 'mean_word_length': 3.4574468085106385, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '484529', 'n_tokens_mistral': 408, 'n_tokens_neox': 392, 'n_words': 112}