o
    ËÝ2g­  ã                   @  sB   d Z ddlmZ ddlmZmZmZ erddlZG dd„ dƒZ	dS )zProvide the ModNoteMixin class.é    )Úannotations)ÚTYPE_CHECKINGÚAnyÚ	GeneratorNc                   @  s*   e Zd ZdZddd„Zdd	œddd„ZdS )ÚModNoteMixinzAInterface for classes that can have a moderator note set on them.Úgenerator_kwargsr   Úreturnú*Generator[praw.models.ModNote, None, None]c                 K  s   | j jjjj| j jfi |¤ŽS )a  Get the moderator notes for the author of this object in the subreddit it's posted in.

        :param generator_kwargs: Additional keyword arguments are passed in the
            initialization of the moderator note generator.

        :returns: A generator of :class:`.ModNote`.

        For example, to list all notes the author of a submission, try:

        .. code-block:: python

            for note in reddit.submission("92dd8").mod.author_notes():
                print(f"{note.label}: {note.note}")

        )ÚthingÚ	subredditÚmodÚnotesÚ	redditorsÚauthor)Úselfr   © r   úY/home/garg/my-data/venv/lib/python3.10/site-packages/praw/models/reddit/mixins/modnote.pyÚauthor_notes   s
   ÿÿzModNoteMixin.author_notesN)Úlabelr   ú
str | NoneÚnoteÚstrÚother_settingsúpraw.models.ModNotec                K  s"   | j jjjjd||| j dœ|¤ŽS )a~  Create a moderator note on the author of this object in the subreddit it's posted in.

        :param label: The label for the note. As of this writing, this can be one of the
            following: ``"ABUSE_WARNING"``, ``"BAN"``, ``"BOT_BAN"``,
            ``"HELPFUL_USER"``, ``"PERMA_BAN"``, ``"SOLID_CONTRIBUTOR"``,
            ``"SPAM_WARNING"``, ``"SPAM_WATCH"``, or ``None`` (default: ``None``).
        :param note: The content of the note. As of this writing, this is limited to 250
            characters.
        :param other_settings: Additional keyword arguments are passed to
            :meth:`~.BaseModNotes.create`.

        :returns: The new :class:`.ModNote` object.

        For example, to create a note on a :class:`.Submission`, try:

        .. code-block:: python

            reddit.submission("92dd8").mod.create_note(label="HELPFUL_USER", note="Test note")

        )r   r   r
   Nr   )r
   r   r   r   Úcreate)r   r   r   r   r   r   r   Úcreate_note$   s
   ÿÿzModNoteMixin.create_note)r   r   r   r	   )r   r   r   r   r   r   r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      s
    
ÿr   )
r   Ú
__future__r   Útypingr   r   r   Úpraw.modelsÚprawr   r   r   r   r   Ú<module>   s    