
    {i                        S r SSKJr  SSKJrJr  SSKJr  SSKJ	r	  SSK
Jr  SS	KJr  \(       a  SS
Kr " S S\5      rg
)zProvide the RedditBase class.    )annotations)TYPE_CHECKINGAny)urlparse   )API_PATH)
InvalidURL   )PRAWBaseNc                     ^  \ rS rSrSr\SS j5       rSS jrSS jrSS jr	   S         SU 4S jjjr
SS jrSS	 jrSS
 jrS rS rSS jrSrU =r$ )
RedditBase   z1Base class that represents actual Reddit objects.c                    [        U 5      nUR                  (       d  [        U 5      eUR                  R	                  S5      R                  S5      $ )N/)r   netlocr	   pathrstripsplit)urlparseds     Q/home/james-whalen/.local/lib/python3.13/site-packages/praw/models/reddit/base.py
_url_partsRedditBase._url_parts   s<    #}}S/!{{!!#&,,S11    c                   [        U[        5      (       a*  UR                  5       [        U 5      R                  5       :H  $ [        XR                  5      =(       a3    [        U 5      R                  5       [        U5      R                  5       :H  $ )z5Return whether the other instance equals the current.)
isinstancestrlower	__class__selfothers     r   __eq__RedditBase.__eq__   sa    eS!!;;=CIOO$555unn- 8D	!SZ%5%5%77	
r   c                    UR                  S5      (       d,  U R                  (       d  U R                  5         [        X5      $ U R                  R
                  < SU< 3n[        U5      e)z"Return the value of ``attribute``._z object has no attribute )
startswith_fetched_fetchgetattrr   __name__AttributeError)r!   	attributemsgs      r   __getattr__RedditBase.__getattr__#   sT    ##C((KKM4++((++DYMRS!!r   c                    [        U R                  R                  5      [        [        U 5      R	                  5       5      -  $ )z(Return the hash of the current instance.)hashr   r+   r   r   r!   s    r   __hash__RedditBase.__hash__+   s,    DNN++,tCIOO4E/FFFr   c                   > [         TU ]  XS9  X@l        U(       aV  U R                  U R                  ;  a;  Ub  X0R                  ;   a  gSU R                   SU R                   S3n[        U5      egg)z^Initialize a :class:`.RedditBase` instance.

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

)_dataNz#An invalid value was specified for z". Check that the argument for the z parameter is not empty.)super__init__r(   	STR_FIELD__dict__
ValueError)r!   redditr7   _extra_attribute_to_checkr(   
_str_fieldr.   r   s          r   r9   RedditBase.__init__/   sz     	- $..=)5->77GGijnjxjxiy  zR  SCS/! >:r   c                    X:X  + $ )z;Return whether the other instance differs from the current. r    s     r   __ne__RedditBase.__ne__G   s      r   c                h    U R                   R                   SU R                   S[        U 5      < S3$ )z?Return an object initialization representation of the instance.(=))r   r+   r:   r   r3   s    r   __repr__RedditBase.__repr__K   s/    ..))*!DNN+;1SYMKKr   c                ,    [        X R                  5      $ )z/Return a string representation of the instance.)r*   r:   r3   s    r   __str__RedditBase.__str__O   s    t^^,,r   c                    SU l         g )NTr(   r3   s    r   r)   RedditBase._fetchS   s	    r   c                    U R                  5       u  pn[        U   R                  " S0 UD6nU R                  R	                  SX4S9$ )NGET)methodparamsr   rB   )_fetch_infor   format_redditrequest)r!   namefieldsrT   r   s        r   _fetch_dataRedditBase._fetch_dataV   sF    #//1f~$$.v.||##5#KKr   c                `    U H!  nX R                   ;   d  M  U R                   U	 M#     SU l        g )NF)r;   r(   )r!   
attributesr-   s      r   _reset_attributesRedditBase._reset_attributes[   s+    #IMM)MM), $ r   rO   )r   r   returnz	list[str])r"   z	Any | strra   bool)r-   r   ra   r   )ra   int)NFT)
r=   zpraw.Redditr7   zdict[str, Any] | Noner>   z
str | Noner(   rb   r?   rb   )r"   objectra   rb   )ra   r   )r^   r   )r+   
__module____qualname____firstlineno____doc__staticmethodr   r#   r/   r4   r9   rC   rI   rL   r)   r[   r_   __static_attributes____classcell__)r   s   @r   r   r      s    ;2 2
"G 15"" %" $.	"
 " " "0!L-L
 r   r   )rh   
__future__r   typingr   r   urllib.parser   	endpointsr   
exceptionsr	   baser   prawr   rB   r   r   <module>rs      s.    # " % ! ! $ O Or   