Ë
    Fü´j_e  ã                  ó  — d Z ddlmZ ddlmZ ddlmZmZmZ ddl	m
Z
 ddlmZ ddlmZ ddlmZ dd	lmZ erdd
lmZ ddlZddlmZ ddlmZ ddlmZ  G d„ d«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Zy)z6Provides classes for interacting with moderator notes.é    )Úannotations)Úislice)ÚTYPE_CHECKINGÚAnyÚcast)ÚAPI_PATH)ÚPRAWBase)ÚListingGenerator)ÚComment)Ú
Submission)ÚIteratorN)Úmodels)ÚRedditor)Ú	Subredditc                  óÄ   — e Zd ZdZ	 	 	 	 dd„Z	 	 	 	 	 	 	 	 dd„Z	 	 	 	 	 	 dd„Zdd„Z	 	 	 	 	 	 	 	 	 	 dd„Zdddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 dd	„Z	d
ddddœ	 	 	 	 	 	 	 	 	 dd„Z
y)ÚBaseModNotesz7Provides base methods to interact with moderator notes.c                ó   — || _         y)zpInitialize a :class:`.BaseModNotes` instance.

        :param reddit: An instance of :class:`.Reddit`.

        N)Ú_reddit)ÚselfÚreddits     úS/root/workspace/ytshorts/venv/lib/python3.12/site-packages/praw/models/mod_notes.pyÚ__init__zBaseModNotes.__init__   s   € ð ˆ�ó    c                ó„   — t        j                  |d||¬«       t        dt        | j                  t
        d   fi |¤Ž«      S )NÚparams)Ú	argumentsÚkeyÚ	subredditÚuserúIterator[models.ModNote]Ú	mod_notes)r	   Ú_safely_add_argumentsr   r
   r   r   )r   Úredditorr   Úgenerator_kwargss       r   Ú_all_generatorzBaseModNotes._all_generator%   sI   € ô 	×&Ñ&Ø&ØØØõ		
ô Ø&Ü˜TŸ\™\¬8°KÑ+@ÑUÐDTÑUó
ð 	
r   c              #  óè  K  — t        |«      }t        |«      }	 t        t        |d«      «      }t        t        |d«      «      }t        ||g«      sy dj	                  t        t        |«      «      dj	                  t        t        |«      «      dœ}| j                  j                  t        d   |¬«      }|d   D ]4  }	t        d| j                  j                  j                  |	¬«      «      –— Œ6 ŒØ­w)	Niô  ú,)Ú
subredditsÚusersÚmod_notes_bulk©r   r!   úmodels.ModNote©Údata)ÚiterÚlistr   ÚanyÚjoinÚmapÚstrr   Úgetr   r   Ú	_objectorÚ	objectify)
r   Ú	redditorsr(   Úsubreddits_iterÚredditors_iterÚsubreddits_chunkÚusers_chunkr   ÚresponseÚ	note_dicts
             r   Ú_bulk_generatorzBaseModNotes._bulk_generator6   sã   è ø€ ô ˜zÓ*ˆÜ˜i›ˆØÜ#¤F¨?¸CÓ$@ÓAÐÜœv n°cÓ:Ó;ˆKÜÐ(¨+Ð6Ô7Øà!Ÿh™h¤s¬3Ð0@Ó'AÓBØŸ™¤#¤c¨;Ó"7Ó8ñ,ˆFð —|‘|×'Ñ'¬Ð1AÑ(BÈ6Ð'ÓRˆHØ% kÑ2ò _�	ÜÐ+¨T¯\©\×-CÑ-C×-MÑ-MÐS\Ð-MÓ-]Ó^Ó^ð_ð ùs   ‚C0C2c                óh   — |j                  «       \  }}|xs t        | |d «      }|€t        |«      ‚|S ©N)ÚpopitemÚgetattrÚ	TypeError)r   Úerror_messageÚ
attributesÚ	attributeÚvalue_Úvalues         r   Ú_ensure_attributezBaseModNotes._ensure_attributeH   s=   € Ø&×.Ñ.Ó0Ñˆ	�6ØÒ8œ' $¨	°4Ó8ˆØˆ=Ü˜MÓ*Ð*Øˆr   c             +  ó¢   K  — |r+|D ]%  }|D ]  } | j                   ||fi |¤ŽE d {  –—†  Œ  Œ' y | j                  ||«      E d {  –—†  y 7 Œ$7 Œ­wrA   )r%   r?   )r   Ú	all_notesr8   r(   r$   r   r#   s          r   Ú_noteszBaseModNotes._notesO   sm   è ø€ ñ Ø'ò \�	Ø )ò \�HØ2˜t×2Ñ2°8¸YÑ[ÐJZÑ[×[Ñ[ñ\ñ\ð ×+Ñ+¨I°zÓB×BÑBð \øàBús!   ‚$A¦A§AÁAÁAÁAN)Úlabelr#   r   Úthingc               ój  — d}|r¯|}t        |t        «      rC|}t        | d|«      rt        | d|«      s3t        | j                  j                  |g¬«      «      }n|j                  }t        |t        t        f«      sJ ‚t        | d|«      xs |j                  }t        | d|«      xs |j                  }| j                  d|¬«      }| j                  d|¬«      }|t        |«      t        |«      d	œ}	|r||	d
<   |r||	d<   |	j                  |«       | j                  j                  t        d   |	¬«      S )aÝ  Create a :class:`.ModNote` for a redditor in the specified subreddit.

        :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 redditor: The redditor to create the note for (default: ``None``).

            .. note::

                This parameter is required if ``thing`` is not provided or this is not
                called from a :class:`.Redditor` instance (e.g.,
                ``reddit.redditor.notes``).

        :param subreddit: The subreddit associated with the note (default: ``None``).

            .. note::

                This parameter is required if ``thing`` is not provided or this is not
                called from a :class:`.Subreddit` instance (e.g.,
                ``reddit.subreddit.mod``).

        :param thing: Either the fullname of a comment/submission, a :class:`.Comment`,
            or a :class:`.Submission` to associate with the note.
        :param other_settings: Additional keyword arguments can be provided to handle
            new parameters as Reddit introduces them.

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

        For example, to create a note for u/spez in r/test:

        .. code-block:: python

            reddit.subreddit("test").mod.notes.create(
                label="HELPFUL_USER", note="Test note", redditor="spez"
            )
            # or
            reddit.redditor("spez").mod.notes.create(
                label="HELPFUL_USER", note="Test note", subreddit="test"
            )
            # or
            reddit.notes.create(
                label="HELPFUL_USER", note="Test note", redditor="spez", subreddit="test"
            )

        Nr#   r   )Ú	fullnamesz�Either the 'redditor' or 'thing' parameters must be provided or this method must be called from a Redditor instance (e.g., 'redditor.notes').©r#   z”Either the 'subreddit' or 'thing' parameters must be provided or this method must be called from a Subreddit instance (e.g., 'subreddit.mod.notes').©r   )Únoter   r   rN   Ú	reddit_idr!   r-   )Ú
isinstancer4   rC   Únextr   ÚinfoÚfullnamer   r   Úauthorr   rJ   ÚupdateÚpostr   )
r   rN   rT   r#   r   rO   Úother_settingsrU   Úresolvedr.   s
             r   ÚcreatezBaseModNotes.create^   sF  € ðt ˆ	ÙØ?DˆHÜ˜%¤Ô%Ø!�	ä  j°(Ô;ÄÈÈkÐ[dÔ@eä# D§L¡L×$5Ñ$5ÀÀÐ$5Ó$HÓI‘Hà!ŸN™N�	ô ˜h¬´*Ð(=Ô>Ð>Ð>Ü˜t Z°Ó:ÒM¸h¿o¹oˆHÜ  k°9Ó=ÒSÀ×ASÑASˆIØ×)Ñ)ðXàð *ó 
ˆð
 ×*Ñ*ð'ð  ð	 +ó 
ˆ	ð Ü˜Y›Ü˜“Mñ
ˆñ
 Ø!ˆD�‰MÙØ )ˆD�ÑØ�‰�NÔ#Ø�|‰|× Ñ ¤¨+Ñ!6¸TÐ ÓBÐBr   F)Ú
delete_allÚnote_idr#   r   c               óF  — | j                  d|¬«      }| j                  d|¬«      }|s|€d}t        |«      ‚|r,| j                  d|g|g¬«      D ]  }|j                  «        Œ y|t	        |«      t	        |«      d	œ}	| j
                  j                  t        d
   |	¬«       y)aH  Delete note(s) for a redditor.

        :param delete_all: When ``True``, delete all notes for the specified redditor in
            the specified subreddit (default: ``False``).

            .. note::

                This will make a request for each note.

        :param note_id: The ID of the note to delete. This parameter is ignored if
            ``delete_all`` is ``True``.
        :param redditor: The redditor to delete the note(s) for (default: ``None``). Can
            be a :class:`.Redditor` instance or a redditor name.

            .. note::

                This parameter is required if this method is **not** called from a
                :class:`.Redditor` instance (e.g., ``redditor.notes``).

        :param subreddit: The subreddit to delete the note(s) from (default: ``None``).
            Can be a :class:`.Subreddit` instance or a subreddit name.

            .. note::

                This parameter is required if this method is **not** called from a
                :class:`.Subreddit` instance (e.g., ``reddit.subreddit.mod``).


        For example, to delete a note with the ID
        ``"ModNote_d324b280-5ecc-435d-8159-3e259e84e339"``, try:

        .. code-block:: python

            reddit.subreddit("test").mod.notes.delete(
                note_id="ModNote_d324b280-5ecc-435d-8159-3e259e84e339", redditor="spez"
            )
            # or
            reddit.redditor("spez").notes.delete(
                note_id="ModNote_d324b280-5ecc-435d-8159-3e259e84e339", subreddit="test"
            )
            # or
            reddit.notes.delete(
                note_id="ModNote_d324b280-5ecc-435d-8159-3e259e84e339",
                subreddit="test",
                redditor="spez",
            )

        To delete all notes for u/spez, try:

        .. code-block:: python

            reddit.subreddit("test").mod.notes.delete(delete_all=True, redditor="spez")
            # or
            reddit.redditor("spez").notes.delete(delete_all=True, subreddit="test")
            # or
            reddit.notes.delete(delete_all=True, subreddit="test", redditor="spez")

        z�Either the 'redditor' parameter must be provided or this method must be called from a Redditor instance (e.g., 'redditor.notes').rR   zˆEither the 'subreddit' parameter must be provided or this method must be called from a Subreddit instance (e.g., 'subreddit.mod.notes').rS   Nz2Either 'note_id' or 'delete_all' must be provided.T©rL   r8   r(   )ra   r   r   r!   r+   )rJ   rD   rM   Údeleter4   r   r   )
r   r`   ra   r#   r   Ú	redditor_Ú
subreddit_ÚmsgrT   r   s
             r   rd   zBaseModNotes.deleteÀ   sÃ   € ðD %)×$:Ñ$:ðIàð %;ó %
ˆ	ð
 '+×&<Ñ&<ðOàð '=ó '
ˆ
ñ
 ˜g˜oØFˆCÜ˜C“.Ð ÙØŸ™¨d¸y¸kÐWaÐVb˜Ócò �Ø—‘•ñð #Ü  ›_Ü˜I›ñˆFð
 �L‰L×Ñ¤¨Ñ 5¸fÐÕEr   )r   úpraw.RedditÚreturnÚNone)r#   úRedditor | strr   úSubreddit | strr$   r   ri   r    )r8   úlist[Redditor | str]r(   úlist[Subreddit | str]ri   r    )rE   r4   rF   r   ri   r   )
rL   Úboolr8   rm   r(   rn   r$   r   ri   r    )rN   ú
str | NonerT   r4   r#   úRedditor | str | Noner   úSubreddit | str | NonerO   z!Comment | Submission | str | Noner]   r   ri   r,   )
r`   ro   ra   rp   r#   rq   r   rr   ri   rj   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r%   r?   rJ   rM   r_   rd   © r   r   r   r      se  „ ÙAð	àð	ð 
ó	ð
à ð
ð #ð
ð  ð	
ð
 
"ó
ð"_Ø-ð_Ø;Pð_à	!ó_ó$ðCð ðCð (ð	Cð
 *ðCð  ðCð 
"óCð$ !à*.Ø,0Ø37ñ`Cð ð`Cð ð	`Cð
 (ð`Cð *ð`Cð 1ð`Cð ð`Cð 
ó`CðJ !Ø"Ø*.Ø,0ñXFð ðXFð ð	XFð
 (ðXFð *ðXFð 
ôXFr   r   c                  ó\   — e Zd ZdZddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zddœ	 	 	 	 	 	 	 d	d„Zy)
ÚRedditModNotesa`  Provides methods to interact with moderator notes at a global level.

    .. note::

        The authenticated user must be a moderator of the provided subreddit(s).

    For example, the latest note for u/spez in r/redditdev and r/test, and for u/bboe in
    r/redditdev can be iterated through like so:

    .. code-block:: python

        redditor = reddit.redditor("bboe")
        subreddit = reddit.subreddit("redditdev")

        pairs = [(subreddit, "spez"), ("test", "spez"), (subreddit, redditor)]

        for note in reddit.notes(pairs=pairs):
            print(f"{note.label}: {note.note}")

    FN)rL   Úpairsr8   r(   Úthingsc               ó  — |€g }|€g }|€g }|€g }||z   |z   |z   sd}t        |«      ‚t        |«      t        |«      z  dk(  r9t        |«      t        |«      z   dkD  rt        t        |«      dkD  rd«      ‚d«      ‚g }g }	|t        |«      D �
�cg c]  }
t        |«      D ]  }||
f‘Œ Œ c}}
z   |z   }|D ]³  }t        |t        t
        f«      rK|j                  |j                  j                  «       |	j                  |j                  j                  «       Œdt        |t        «      r(|\  }}
|j                  |
«       |	j                  |«       Œœdt        |«      › �}t        |«      ‚  | j                  d|||	dœ|¤ŽS c c}}
w )ac  Get note(s) for each subreddit/user pair, or ``None`` if they don't have any.

        :param all_notes: Whether to return all notes or only the latest note for each
            subreddit/redditor pair (default: ``False``).

            .. note::

                Setting this to ``True`` will result in a request for each unique
                subreddit/redditor pair. If ``subreddits`` and ``redditors`` are
                provided, this will make a request equivalent to number of redditors
                multiplied by the number of subreddits.

        :param pairs: A list of subreddit/redditor tuples.

            .. note::

                Required if ``subreddits``, ``redditors``, nor ``things`` are provided.

        :param redditors: A list of redditors to return notes for. This parameter is
            used in tandem with ``subreddits`` to get notes from multiple subreddits for
            each of the provided redditors.

            .. note::

                Required if ``items`` or ``things`` is not provided or if ``subreddits``
                **is** provided.

        :param subreddits: A list of subreddits to return notes for. This parameter is
            used in tandem with ``redditors`` to get notes for multiple redditors from
            each of the provided subreddits.

            .. note::

                Required if ``items`` or ``things`` is not provided or if ``redditors``
                **is** provided.

        :param things: A list of comments and/or submissions to return notes for.
        :param generator_kwargs: Additional keyword arguments passed to the generator.
            This parameter is ignored when ``all_notes`` is ``False``.

        :returns: A generator that yields the most recent :class:`.ModNote` (or ``None``
            if the user doesn't have any notes) per entry in their relative order. If
            ``all_notes`` is ``True``, this will yield all notes for each entry.

        .. note::

            This method will merge the subreddits and redditors provided from ``pairs``,
            ``redditors``, ``subreddits``, and ``things``.

        .. note::

            This method accepts :class:`.Redditor` instances or redditor names and
            :class:`.Subreddit` instances or subreddit names where applicable.

        For example, the latest note for u/spez in r/redditdev and r/test, and for
        u/bboe in r/redditdev can be iterated through like so:

        .. code-block:: python

            redditor = reddit.redditor("bboe")
            subreddit = reddit.subreddit("redditdev")

            pairs = [(subreddit, "spez"), ("test", "spez"), (subreddit, redditor)]

            for note in reddit.notes(pairs=pairs):
                print(f"{note.label}: {note.note}")

        For example, **all** the notes for u/spez and u/bboe in r/announcements,
        r/redditdev, and r/test can be iterated through like so:

        .. code-block:: python

            redditor = reddit.redditor("bboe")
            subreddit = reddit.subreddit("redditdev")

            for note in reddit.notes(
                redditors=["spez", redditor],
                subreddits=["announcements", subreddit, "test"],
                all_notes=True,
            ):
                print(f"{note.label}: {note.note}")

        For example, the latest note for the authors of the last 5 comments and
        submissions from r/test can be iterated through like so:

        .. code-block:: python

            submissions = list(reddit.subreddit("test").new(limit=5))
            comments = list(reddit.subreddit("test").comments(limit=5))

            for note in reddit.notes(things=submissions + comments):
                print(f"{note.label}: {note.note}")

        .. note::

            Setting ``all_notes`` to ``True`` will make a request for each redditor and
            subreddit combination. The previous example will make 6 requests.

        zWEither the 'pairs', 'redditors', 'subreddits', or 'things' parameters must be provided.r   z;'redditors' must be non-empty if 'subreddits' is not empty.z;'subreddits' must be non-empty if 'redditors' is not empty.z1Cannot get subreddit and author fields from type rc   rw   )rD   ÚlenÚsetrV   r   r   ÚappendrZ   Únamer   Údisplay_nameÚtupleÚtyperM   )r   rL   rz   r8   r(   r{   r$   rg   Úmerged_redditorsÚmerged_subredditsr#   r   ÚitemsÚitems                 r   Ú__call__zRedditModNotes.__call__1  s»  € ðZ ˆ=ØˆEØÐØˆIØÐØˆJØˆ>ØˆFØ˜	Ñ! JÑ.°Ò7ØkˆCÜ˜C“.Ð Üˆy‹>œC 
›OÑ+¨qÒ0´S¸³^ÄcÈ*ÃoÑ5UÐXYÒ5YÜä�z“? QÒ&ð Nóð ð Sóð ð ÐØÐØ¼sÀ9»~×o°8Ô_bÐcmÓ_nÒoÐR[˜) XÒ.ÐoÐ.ÓoÑoÐrxÑxˆàò 
	%ˆDÜ˜$¤¬*Ð 5Ô6Ø ×'Ñ'¨¯©×(8Ñ(8Ô9Ø!×(Ñ(¨¯©×)DÑ)DÕEÜ˜D¤%Ô(Ø&*Ñ#�	˜8Ø ×'Ñ'¨Ô1Ø!×(Ñ(¨Õ3àIÌ$ÈtË*ÈÐV�Ü “nÐ$ð
	%ð ˆt�{‰{ð 
ØØ&Ø(ñ
ð ñ	
ð 	
ùó ps   ÂF©rL   c               óÐ   — g }g }|D ]8  }|j                  |j                  «       |j                  |j                  «       Œ: |€t        |«      dk(  } | j                  d|||dœ|¤ŽS )a]  Return notes associated with the author of a :class:`.Comment` or :class:`.Submission`.

        :param things: One or more things to return notes on. Must be a
            :class:`.Comment` or :class:`.Submission`.
        :param all_notes: Whether to return all notes, or only the latest (default:
            ``True`` if only one thing is provided otherwise ``False``).

            .. note::

                Setting this to ``True`` will result in a request for each thing.


        :returns: A generator that yields the most recent :class:`.ModNote` (or ``None``
            if the user doesn't have any notes) per entry in their relative order. If
            ``all_notes`` is ``True``, this will yield all notes for each entry.

        For example, to get the latest note for the authors of the top 25 submissions in
        r/test:

        .. code-block:: python

            submissions = reddit.subreddit("test").top(limit=25)
            for note in reddit.notes.things(*submissions):
                print(f"{note.label}: {note.note}")

        For example, to get the latest note for the authors of the last 25 comments in
        r/test:

        .. code-block:: python

            comments = reddit.subreddit("test").comments(limit=25)
            for note in reddit.notes.things(*comments):
                print(f"{note.label}: {note.note}")

        é   rc   rw   )r   r   rZ   r}   rM   )r   rL   r{   r$   r(   r8   rO   s          r   r{   zRedditModNotes.thingsÆ  sƒ   € ðR ˆ
Øˆ	Øò 	+ˆEØ×Ñ˜eŸo™oÔ.Ø×Ñ˜UŸ\™\Õ*ð	+ð ÐÜ˜F› qÑ(ˆIØˆt�{‰{ð 
ØØØ!ñ
ð ñ	
ð 	
r   )rL   ro   rz   z3list[tuple[Subreddit | str, Redditor | str]] | Noner8   zlist[Redditor | str] | Noner(   zlist[Subreddit | str] | Noner{   z!list[Comment | Submission] | Noner$   r   ri   r    )r{   zComment | SubmissionrL   úbool | Noner$   r   ri   r    )rs   rt   ru   rv   rˆ   r{   rw   r   r   ry   ry     s�   „ ñð0  ØEIØ15Ø37Ø48ñS
ð ðS
ð Cð	S
ð
 /ðS
ð 1ðS
ð 2ðS
ð  ðS
ð 
"óS
ðp "&ñ5
à%ð5
ð ð5
ð  ð	5
ð
 
"ô5
r   ry   c                  ó@   ‡ — e Zd ZdZdˆ fd„Zddœ	 	 	 	 	 	 	 dd„Zˆ xZS )ÚRedditorModNotesaµ  Provides methods to interact with moderator notes at the redditor level.

    .. note::

        The authenticated user must be a moderator of the provided subreddit(s).

    For example, all the notes for u/spez in r/test can be iterated through like so:

    .. code-block:: python

        redditor = reddit.redditor("spez")

        for note in redditor.notes.subreddits("test"):
            print(f"{note.label}: {note.note}")

    c                ó2   •— t         ‰| �  |«       || _        y)z°Initialize a :class:`.RedditorModNotes` instance.

        :param reddit: An instance of :class:`.Reddit`.
        :param redditor: An instance of :class:`.Redditor`.

        N)Úsuperr   r#   )r   r   r#   Ú	__class__s      €r   r   zRedditorModNotes.__init__  s   ø€ ô 	‰Ñ˜Ô Ø ˆ�r   Nr‰   c               óÄ   — t        |«      dk(  rd}t        |«      ‚|€t        |«      dk(  } | j                  d|| j                  gt        |«      z  t	        |«      dœ|¤ŽS )aI  Return notes for this :class:`.Redditor` from one or more subreddits.

        :param subreddits: One or more subreddits to retrieve the notes from. Must be
            either a :class:`.Subreddit` or a subreddit name.
        :param all_notes: Whether to return all notes or only the latest note (default:
            ``True`` if only one subreddit is provided otherwise ``False``).

            .. note::

                Setting this to ``True`` will result in a request for each subreddit.


        :returns: A generator that yields the most recent :class:`.ModNote` (or ``None``
            if this redditor doesn't have any notes) per subreddit in their relative
            order. If ``all_notes`` is ``True``, this will yield all notes or ``None``
            from each subreddit for this redditor.

        For example, all the notes for u/spez in r/test can be iterated through like so:

        .. code-block:: python

            redditor = reddit.redditor("spez")

            for note in redditor.notes.subreddits("test"):
                print(f"{note.label}: {note.note}")

        For example, the latest note for u/spez from r/test and r/redditdev can be
        iterated through like so:

        .. code-block:: python

            redditor = reddit.redditor("spez")
            subreddit = reddit.subreddit("redditdev")

            for note in redditor.notes.subreddits("test", subreddit):
                print(f"{note.label}: {note.note}")

        For example, **all** the notes for u/spez in r/test and r/redditdev can be
        iterated through like so:

        .. code-block:: python

            redditor = reddit.redditor("spez")
            subreddit = reddit.subreddit("redditdev")

            for note in redditor.notes.subreddits("test", subreddit, all_notes=True):
                print(f"{note.label}: {note.note}")

        r   z&At least 1 subreddit must be provided.r‹   rc   rw   )r}   Ú
ValueErrorrM   r#   r0   )r   rL   r(   r$   rg   s        r   r(   zRedditorModNotes.subreddits  ss   € ôn ˆz‹?˜aÒØ:ˆCÜ˜S“/Ð!ØÐÜ˜J›¨1Ñ,ˆIØˆt�{‰{ð 
ØØ—}‘}�o¬¨J«Ñ7Ü˜JÓ'ñ
ð ñ	
ð 	
r   )r   rh   r#   rk   ri   rj   )r(   rl   rL   rŒ   r$   r   ri   r    )rs   rt   ru   rv   r   r(   Ú__classcell__©r‘   s   @r   rŽ   rŽ   þ  sB   ø„ ñõ"!ð "&ñA
à$ðA
ð ðA
ð  ð	A
ð
 
"÷A
r   rŽ   c                  ó@   ‡ — e Zd ZdZdˆ fd„Zddœ	 	 	 	 	 	 	 dd„Zˆ xZS )ÚSubredditModNotesa±  Provides methods to interact with moderator notes at the subreddit level.

    .. note::

        The authenticated user must be a moderator of this subreddit.

    For example, all the notes for u/spez in r/test can be iterated through like so:

    .. code-block:: python

        subreddit = reddit.subreddit("test")

        for note in subreddit.mod.notes.redditors("spez"):
            print(f"{note.label}: {note.note}")

    c                ó2   •— t         ‰| �  |«       || _        y)z³Initialize a :class:`.SubredditModNotes` instance.

        :param reddit: An instance of :class:`.Reddit`.
        :param subreddit: An instance of :class:`.Subreddit`.

        N)r�   r   r   )r   r   r   r‘   s      €r   r   zSubredditModNotes.__init__p  s   ø€ ô 	‰Ñ˜Ô Ø"ˆ�r   Nr‰   c          	     óÄ   — t        |«      dk(  rd}t        |«      ‚|€t        |«      dk(  } | j                  d|t        |«      | j                  gt        |«      z  dœ|¤ŽS )a'  Return notes from this :class:`.Subreddit` for one or more redditors.

        :param redditors: One or more redditors to retrieve notes for. Must be either a
            :class:`.Redditor` or a redditor name.
        :param all_notes: Whether to return all notes or only the latest note (default:
            ``True`` if only one redditor is provided otherwise ``False``).

            .. note::

                Setting this to ``True`` will result in a request for each redditor.


        :returns: A generator that yields the most recent :class:`.ModNote` (or ``None``
            if the user doesn't have any notes in this subreddit) per redditor in their
            relative order. If ``all_notes`` is ``True``, this will yield all notes for
            each redditor.

        For example, all the notes for u/spez in r/test can be iterated through like so:

        .. code-block:: python

            subreddit = reddit.subreddit("test")

            for note in subreddit.mod.notes.redditors("spez"):
                print(f"{note.label}: {note.note}")

        For example, the latest note for u/spez and u/bboe from r/test can be iterated
        through like so:

        .. code-block:: python

            subreddit = reddit.subreddit("test")
            redditor = reddit.redditor("bboe")

            for note in subreddit.mod.notes.redditors("spez", redditor):
                print(f"{note.label}: {note.note}")

        For example, **all** the notes for both u/spez and u/bboe in r/test can be
        iterated through like so:

        .. code-block:: python

            subreddit = reddit.subreddit("test")
            redditor = reddit.redditor("bboe")

            for note in subreddit.mod.notes.redditors("spez", redditor, all_notes=True):
                print(f"{note.label}: {note.note}")

        r   z%At least 1 redditor must be provided.r‹   rc   rw   )r}   r“   rM   r0   r   )r   rL   r8   r$   rg   s        r   r8   zSubredditModNotes.redditorsz  ss   € ôn ˆy‹>˜QÒØ9ˆCÜ˜S“/Ð!ØÐÜ˜I›¨!Ñ+ˆIØˆt�{‰{ð 
ØÜ˜9“oØŸ™Ð'¬#¨i«.Ñ8ñ
ð ñ	
ð 	
r   )r   rh   r   rl   ri   rj   )r8   rk   rL   rŒ   r$   r   ri   r    )rs   rt   ru   rv   r   r8   r”   r•   s   @r   r—   r—   ^  sB   ø„ ñõ"#ð "&ñA
à"ðA
ð ðA
ð  ð	A
ð
 
"÷A
r   r—   )rv   Ú
__future__r   Ú	itertoolsr   Útypingr   r   r   Ú
praw.constr   Úpraw.models.baser	   Úpraw.models.listing.generatorr
   Úpraw.models.reddit.commentr   Úpraw.models.reddit.submissionr   Úcollections.abcr   Úprawr   Úpraw.models.reddit.redditorr   Úpraw.models.reddit.subredditr   r   ry   rŽ   r—   rw   r   r   ú<module>r¦      sp   ðÙ <å "å ß +Ñ +å Ý %Ý :Ý .Ý 4áÝ(ãÝÝ4Ý6÷AFñ AFôH`
�\ô `
ôF]
�|ô ]
ô@]
˜õ ]
r   