HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/__pycache__/pyclbr.cpython-35.pyc


Füƒaü4ã@sdZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
ddlmZddddgZ
iZGd	d„dƒZGd
d„dƒZddd„Zddd„Zdd
d„Zdd„Zdd„Zdd„ZedkreƒdS)açParse a Python module and describe its classes and methods.

Parse enough of a Python file to recognize imports and class and
method definitions, and to find out the superclasses of a class.

The interface consists of a single function:
        readmodule_ex(module [, path])
where module is the name of a Python module, and path is an optional
list of directories where the module is to be searched.  If present,
path is prepended to the system search path sys.path.  The return
value is a dictionary.  The keys of the dictionary are the names of
the classes defined in the module (including classes that are defined
via the from XXX import YYY construct).  The values are class
instances of the class Class defined here.  One special key/value pair
is present for packages: the key '__path__' has a list as its value
which contains the package search path.

A class is described by the class Class in this module.  Instances
of this class have the following instance variables:
        module -- the module name
        name -- the name of the class
        super -- a list of super classes (Class instances)
        methods -- a dictionary of methods
        file -- the file in which the class was defined
        lineno -- the line in the file on which the class statement occurred
The dictionary of methods uses the method names as keys and the line
numbers on which the method was defined as values.
If the name of a super class is not recognized, the corresponding
entry in the list of super classes is not a class instance but a
string giving the name of the super class.  Since import statements
are recognized and imported modules are scanned as well, this
shouldn't happen often.

A function is described by the class Function in this module.
Instances of this class have the following instance variables:
        module -- the module name
        name -- the name of the class
        file -- the file in which the class was defined
        lineno -- the line in the file on which the class statement occurred
éN)ÚNAMEÚDEDENTÚOP)Ú
itemgetterÚ
readmoduleÚ
readmodule_exÚClassÚFunctioncs4eZdZdZ‡fdd†Zdd„Z‡S)rz"Class to represent a Python class.csL||_||_|dkr$g}||_i|_||_||_dS)N)ÚmoduleÚnameÚsuperÚmethodsÚfileÚlineno)Úselfr
rrrr)Ú	__class__©ú/usr/lib/python3.5/pyclbr.pyÚ__init__9s					zClass.__init__cCs||j|<dS)N)r
)rrrrrrÚ
_addmethodCszClass._addmethod)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rrrr)rrr7s
c@s"eZdZdZdd„ZdS)r	z.Class to represent a top-level Python functioncCs(||_||_||_||_dS)N)r
rrr)rr
rrrrrrrHs			zFunction.__init__N)rrrrrrrrrr	FscCsOi}xBt||pgƒjƒD]%\}}t|tƒr"|||<q"W|S)z}Backwards compatible interface.

    Call readmodule_ex() and then only keep Class objects from the
    resulting dictionary.)Ú_readmoduleÚitemsÚ
isinstancer)r
ÚpathZresÚkeyÚvaluerrrrNs
(cCst||pgƒS)zÕRead a module file and return a dictionary of classes.

    Search for MODULE in PATH and sys.path, read and parse the
    module and return a dictionary with one entry for each class
    found in the module.
    )r)r
rrrrrZsc&!Cs(|dk	rd||f}n|}|tkr9t|Si}|tjkrh|dkrh|t|<|S|jdƒ}|dkr
|d|…}||dd…}t|||ƒ}|dk	rÕd||f}d|krötdj|ƒƒ‚t||d|ƒSd}	|dk	r%|}
n
|tj}
tj	j
||
ƒ}|t|<|jdk	rm|j|d<y&|jj
|ƒ}|dkr’|SWnttfk
r±|SYnX|jj|ƒ}
tj|ƒ}	g}tj|	jƒ}yx|D]\}}}}}|tkrM|\}}xÛ|rI|dd|krI|d=q%Wqõ|dkr |\}}x%|rŒ|dd|krŒ|d=qhWt|ƒdd	…\}}}|tkr»qõ|rñ|dd}t|tƒr
|j||ƒnt|||
|ƒ||<|jd|fƒqõ|d
krt|\}}x%|r_|dd|kr_|d=q;Wt|ƒdd	…\}}}|tkrŽqõt|ƒdd	…\}}}d}|dkr6g}d}g}x\t|ƒdd	…\}}}|dkr§|dkr§dj|ƒ}||kr3||}na|jdƒ}t|ƒdkr”|d} |d}| tkr”t| }!||!kr”|!|}|j|ƒg}|dkrÀ|d7}qÔ|dkræ|d8}|dkr,PqÔ|d
kr|dkrqÔ|tt fkrÔ|dkrÔ|j|ƒqÔW|}t||||
|ƒ}|s^|||<|j||fƒqõ|dkr|ddkrt!|ƒ}"xa|"D]m\}#}$yV|dkrÎt|#|ƒn6yt|#||ƒWntk
rt|#gƒYnXWq£Yq£Xq£Wqõ|dkrõ|ddkrõt"|ƒ\}#}|#sõ|dkr[qõt!|ƒ}yt|#||ƒ}!WnwõYnXxr|D]j\}}%||!krÁ|!|||%p½|<q’|dkr’x,|!D]$}|ddkrÔ|!|||<qÔWq’WqõWWnt#k
rYnX|	j$ƒ|S)a.Do the hard work for readmodule[_ex].

    If INPACKAGE is given, it must be the dotted name of the package in
    which we are searching for a submodule, and then PATH must be the
    package search path; otherwise, we are searching for a top-level
    module, and PATH is combined with sys.path.
    Nz%s.%sÚ.réÚ__path__zNo package named {}ÚdeféÚclassú(ú)ú,ÚéÚimportÚfromÚ*Ú_éÿÿÿÿr/r/r/r/r/r/)r'r(éþÿÿÿr/)%Ú_modulesÚsysÚbuiltin_module_namesÚrfindrÚImportErrorÚformatrÚ	importlibÚutilÚ_find_spec_from_pathÚsubmodule_search_locationsÚloaderÚ
get_sourceÚAttributeErrorÚget_filenameÚioÚStringIOÚtokenizeÚgenerate_tokensÚreadlinerÚnextrrrrr	ÚappendÚjoinÚsplitÚlenrÚ_getnamelistÚ_getnameÚ
StopIterationÚclose)&r
rZ	inpackageZ
fullmoduleÚdictÚiÚpackageZ	submoduleÚparentÚfZsearch_pathÚspecÚsourceZfnameÚstackÚgÚ	tokentypeÚtokenÚstartZ_endÚ_linerZ
thisindentZ	meth_nameZ	cur_classZ
class_nameZinheritÚnamesÚlevelrÚnÚcÚmÚdÚmodulesÚmodZ_mod2Zn2rrrrcs	
	


		












rcCs g}x“t|ƒ\}}|s"P|dkrCt|ƒ\}}nd}|j||fƒx,|dkrŠd|krŠt|ƒd}q_W|dkr	Pq	W|S)NÚasr(Ú
r!)rJrErD)rUrZrrWZname2rrrrI!srIcCsÊg}t|ƒdd…\}}|tkrD|dkrDd|fS|j|ƒxct|ƒdd…\}}|dkr}Pt|ƒdd…\}}|tkr¦P|j|ƒqTWdj|ƒ|fS)Nrr*r-r )rDrrErF)rUÚpartsrVrWrrrrJ5s

rJc	Cssddl}tjd}|jj|ƒrz|jj|ƒg}|jj|ƒ}|jƒjdƒr€|dd…}ng}t	||ƒ}t
|jƒƒ}|jddd„ƒxµ|D]­}t
|tƒrFtd|j|j|jƒt|jjƒdtdƒƒ}xX|D](\}}|d	krtd
||ƒqWq¾t
|tƒr¾td|j|jƒq¾WdS)
Nrr!z.pyr$rcSst|ddƒS)Nrr)Úgetattr)ÚarrrÚ<lambda>Usz_main.<locals>.<lambda>r%r"z  defr#éýÿÿÿ)Úosr2ÚargvrÚexistsÚdirnameÚbasenameÚlowerÚendswithrÚlistÚvaluesÚsortrrÚprintrrrÚsortedr
rrr	)	rirarrMZobjsÚobjr
rrrrrÚ_mainHs(

!rvÚ__main__)rr?rir2Úimportlib.utilr7rArWrrrÚoperatorrÚ__all__r1rr	rrrrIrJrvrrrrrÚ<module>(s&	¾