+
    کh                         ^ RI t ^ RIt^ RIHt ^ RIHt ^ RIHtHtH	t	 Rt
 ! R R]4      tRR R lltRR	 R
 lltR R lt ! R R]4      t] ! R R]4      4       tR R ltRR R lltR# )    N)literal_eval)total_ordering)
NamedTupleSequenceUnionc                   ,   a  ] tR t^t o V 3R ltRtV tR# )Versionc                >   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   # )   majorminormicroint)format__classdict__s   "-/usr/lib/python3/dist-packages/parso/utils.py__annotate__Version.__annotate__   s%     J J  J      N__name__
__module____qualname____firstlineno____annotate_func____static_attributes____classdictcell__r   s   @r   r	   r	            r   r	   c                R    V ^8  d   QhR\         R\        R\        \         ,          /# )r   stringkeependsreturn)strboolr   )r   s   "r   r   r      s%     )/ )/ )/t )/ )/r   c                *   V'       d   V P                  R4      p. p\        V4       F-  w  rE VR,          pV\        9   d   VP                  V4       K-  K/  	  \        V4       F+  p W',          W'^,           ,          ,           W'&   W'^,            K-  	  V P                  R4      '       g   V P                  R4      '       g   V R8X  d   VP                  R4       V# \        P                  ! RV 4      #   \         d     K  i ; i  \         d     K  i ; i)a  
Intended for Python code. In contrast to Python's :py:meth:`str.splitlines`,
looks at form feeds and other special characters as normal text. Just
splits ``\n`` and ``\r\n``.
Also different: Returns ``[""]`` for an empty string input.

In Python 2.7 form feeds are used as normal characters when using
str.splitlines. However in Python 3 somewhere there was a decision to split
also on form feeds.
T
 z
\n|\r\n|\r)	
splitlines	enumerate_NON_LINE_BREAKSappend
IndexErrorreversedendswithresplit)r#   r$   lstmergeilinelast_chrindexs   &&      r   split_linesr<      s     %  ~GA$8 //LLO 0 & e_E Z#ai.8
	N % ??4  FOOD$9$9Vr\JJrN
xxv..-     s#   	C1''D1D ?D DDc                j    V ^8  d   QhR\         \        \        3,          R\        R\        R\        /# )r   sourceencodingerrorsr%   )r   r&   bytes)r   s   "r   r   r   I   s5     1 1#u*1),1@C11r   c                   a a VV 3R lp\        S \        4      '       d   S # V! 4       o \        S SV4      #   \         d    TR8X  d   \        S RT4      u # h i ; i)a5  
Checks for unicode BOMs and PEP 263 encoding declarations. Then returns a
unicode object like in :py:meth:`bytes.decode`.

:param encoding: See :py:meth:`bytes.decode` documentation.
:param errors: See :py:meth:`bytes.decode` documentation. ``errors`` can be
    ``'strict'``, ``'replace'`` or ``'ignore'``.
c                 F  < \        R4      p SP                  V 4      '       d   R# \        P                  ! RS4      P	                  ^ 4      p\        P
                  ! RV4      pV'       d7   VP	                  ^4      p\        V\        4      '       g   \        VRR4      pV# S# )z
For the implementation of encoding definitions in Python, look at:
- http://www.python.org/dev/peps/pep-0263/
- http://docs.python.org/2/reference/lexical_analysis.html#encoding-declarations
zb'\xef\xbb\xbf'utf-8s   (?:[^\r\n]*(?:\r\n|\r|\n)){0,2}s   coding[=:]\s*([-\w.]+)asciireplace)r   
startswithr4   matchgroupsearch
isinstancer&   )	byte_markfirst_two_linespossible_encodinger?   r>   s       r   detect_encoding0python_bytes_to_unicode.<locals>.detect_encodingT   s     !!34	Y''((#FOUUVWXII&@&57!''*Aa%%7I.H Or   rF   rD   )rK   r&   LookupError)r>   r?   r@   rP   s   ff& r   python_bytes_to_unicoderS   I   sc    . &# H
68V,, Y
 vw//s   7 AAc                $    V ^8  d   QhR\         /# r   r%   )r	   )r   s   "r   r   r   }   s     K Kg Kr   c            	         ^ RI Hp  \        P                  ! RV 4      p\	        \        V4       UUu. uF  w  r#V^8X  d   TM
\        V4      NK  	  upp!  # u uppi )zT
Returns a namedtuple of parso's version, similar to Python's
``sys.version_info``.
)__version__z
[a-z]+|\d+)parsorW   r4   findallr	   r.   r   )rW   tuplr8   xs       r   version_infor\   }   sI    
 "::m[1D4I!q&Qc!f,IJJIs   A
c                   ,   a  ] tR t^t o V 3R ltRtV tR# )_PythonVersionInfoc                2   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   # )r   r   r   r   )r   r   s   "r   r   _PythonVersionInfo.__annotate__   s     J J r   r   Nr   r    s   @r   r^   r^      r!   r   r^   c                   D   a a ] tR t^t oV 3R ltV 3R ltR tRtVtV ;t	# )PythonVersionInfoc                   < \        V\        4      '       d7   \        V4      ^8w  d   \        R4      hV P                  V P
                  3V8  # \        SV `  V4       V P                  V P
                  3# )r   'Can only compare to tuples of length 2.)rK   tuplelen
ValueErrorr   r   super__gt__selfother	__class__s   &&r   ri   PythonVersionInfo.__gt__   s^    eU##5zQ !JKKJJ

+e33u

DJJ''r   c                   < \        V\        4      '       d7   \        V4      ^8w  d   \        R4      hV P                  V P
                  3V8H  # \        SV `  V4       R# )r   rd   N)rK   re   rf   rg   r   r   rh   __eq__rj   s   &&r   rp   PythonVersionInfo.__eq__   sK    eU##5zQ !JKKJJ

+u44ur   c                .    V P                  V4      '       * # N)rp   )rk   rl   s   &&r   __ne__PythonVersionInfo.__ne__   s    ;;u%%%r   r   )
r   r   r   r   ri   rp   rt   r   r   __classcell__)rm   r   s   @@r   rb   rb      s     (& &r   rb   c                $    V ^8  d   QhR\         /# rU   )rb   )r   s   "r   r   r      s     + +0 +r   c                    \         P                  ! R V 4      pVf   \        R4      h\        VP	                  ^4      4      pVP	                  ^4      pVf    V^8X  d   RpMV^8X  d   RpM\        R4      h\        V4      p\        W#4      # )z-(\d+)(?:\.(\d{1,2})(?:\.\d+)?)?((a|b|rc)\d)?$zNThe given version is not in the right format. Use something like "3.8" or "3".76z7Sorry, no support yet for those fancy new/old versions.)r4   rH   rg   r   rI   NotImplementedErrorrb   )versionrH   r   r   s   &   r   _parse_versionr}      s    HHEwOE} < = 	= AEKKNE} A:EaZE%&_``JEU**r   c                0    V ^8  d   QhR\         R\        /# )r   r|   r%   )r&   rb   )r   s   "r   r   r      s     # ## #1B #r   c                    V f   R\         P                  R,          ,          p \        V \        4      '       g   \	        R4      h\        V 4      # )z
Checks for a valid version number (e.g. `3.8` or `3.10.1` or `3`) and
returns a corresponding version info that is always two characters long in
decimal.
z%s.%s:Nr   Nz#version must be a string like "3.8")sysr\   rK   r&   	TypeErrorr}   )r|   s   &r   parse_version_stringr      sB     C,,R00gs##=>>'""r   )   u    u    )F)rD   strictrs   )r4   r   astr   	functoolsr   typingr   r   r   r/   r	   r<   rS   r\   r^   rb   r}   r   r   r   r   <module>r      st    	 
  $ . .

 j )/X1hK 
 &* & &*+*# #r   