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.7/__pycache__/pyclbr.cpython-37.pyc
B

{a!;@sdZddlZddlZddlZddlZddlmZmZm	Z	ddddgZ
iZGdd	d	ZGd
ddeZ
GdddeZdd
ZdddZdddZdddZd ddZddZddZddZddZedkredS)!aParse a Python module and describe its classes and functions.

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

The interface consists of a single function:
    readmodule_ex(module, path=None)
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 and functions defined in the module (including classes that are
defined via the from XXX import YYY construct).  The values are
instances of classes Class and Function.  One special key/value pair is
present for packages: the key '__path__' has a list as its value which
contains the package search path.

Classes and Functions have a common superclass: _Object.  Every instance
has the following attributes:
    module  -- name of the module;
    name    -- name of the object;
    file    -- file in which the object is defined;
    lineno  -- line in the file where the object's definition starts;
    parent  -- parent of this object, if any;
    children -- nested objects contained in this object.
The 'children' attribute is a dictionary mapping names to objects.

Instances of Function describe functions with the attributes from _Object.

Instances of Class describe classes with the attributes from _Object,
plus the following:
    super   -- list of super classes (Class instances if possible);
    methods -- mapping of method names to beginning line numbers.
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.
N)NAMEDEDENTOP
readmodule
readmodule_exClassFunctionc@s eZdZdZddZddZdS)_Objectz*Informaton about Python class or function.cCs(||_||_||_||_||_i|_dS)N)modulenamefilelinenoparentchildren)selfr
rrr
rr/usr/lib/python3.7/pyclbr.py__init__6sz_Object.__init__cCs||j|<dS)N)r)rrobjrrr	_addchild>sz_Object._addchildN)__name__
__module____qualname____doc__rrrrrrr	4sr	c@seZdZdZdddZdS)rz7Information about a Python function, including methods.NcCst||||||dS)N)r	r)rr
rrr
rrrrrDszFunction.__init__)N)rrrrrrrrrrBscs*eZdZdZdfdd	ZddZZS)rz!Information about a Python class.Ncs0t|||||||dkr gn||_i|_dS)N)r	rsupermethods)rr
rrrr
r)	__class__rrrJszClass.__init__cCs||j|<dS)N)r)rrr
rrr
_addmethodOszClass._addmethod)N)rrrrrr
__classcell__rr)rrrHscCs:t|j||j||}|||t|tr6||||S)z*Return a Function after nesting within ob.)rr
rr
isinstancerr)ob	func_namer
Znewfuncrrr_nest_functionSs

r"cCs&t|j|||j||}||||S)z'Return a Class after nesting within ob.)rr
rr)r 
class_namer
rZnewclassrrr_nest_class[sr$cCs:i}x0t||pgD]\}}t|tr|||<qW|S)zReturn Class objects for the top-level classes in module.

    This is the original interface, before Functions were added.
    )_readmoduleitemsrr)r
pathZreskeyvaluerrrras

cCst||p
gS)zReturn a dictionary with all functions and classes in module.

    Search for module in PATH + sys.path.
    If possible, include imported superclasses.
    Do this by reading source, without importing (and executing) it.
    )r%)r
r'rrrrmsc	Cs`|dk	rd||f}n|}|tkr*t|Si}|tjkrL|dkrL|t|<|S|d}|dkr|d|}||dd}t|||}|dk	rd||f}d|krtd|t||d|Sd}	|dk	r|}
n
|tj}
tj	
||
}|t|<|jdk	r|j|d<y|j
|}|dkr$|SWnttfk
r@|SX|j|}
t|||
|||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 {})_modulessysbuiltin_module_namesrfindr%ImportErrorformatr'	importlibutil_find_spec_from_pathsubmodule_search_locationsloader
get_sourceAttributeErrorget_filename_create_tree)r
r'	inpackage
fullmoduletreeipackageZ	submodulerfZsearch_pathspecsourcefnamerrrr%vsF	



r%c!
Csjt|}g}t|j}y*x"|D]\}	}
}}}
|	tkrh|\}}x|rd|dd|krd|d=qHWq&|
dkr|\}}x|r|dd|kr|d=q|Wt|dd\}	}}|	tkrq&d}|r|dd}t|||}nt	||||}|||<|
||fq&|
dkr|\}}x$|r8|dd|kr8|d=qWt|dd\}	}}|	tkr\q&t|dd\}	}
}d}|
dkrg}d}g}xt|dd\}	}
}|
d	kr2|dkr2d
|}||kr||}nL|d}t
|dkr$|d}|d}|tkr$t|}||kr$||}|
|g}|
dkrF|d7}nX|
d
krf|d8}|dkrPn8|
dkr||dkr|n"|	ttfkr|dkr|
|
qW|}|r|dd}t||||}nt|||||}|||<|
||fq&|
dkr|ddkrt|}xl|D]d\}}yL|dkr8t||n2yt|||Wn tk
rht|gYnXWnYnXqWq&|
dkr&|ddkr&t|\}}
|r&|
dkrq&t|}yt|||}Wnw&YnXxd|D]\\}} ||kr|||| p|<n4|dkrx(|D] }|ddkr||||<qWqWq&WWntk
r\YnX||S)aReturn the tree for a particular module.

    fullmodule (full module name), inpackage+module, becomes o.module.
    path is passed to recursive calls of _readmodule.
    fname becomes o.file.
    source is tokenized.  Imports cause recursive calls to _readmodule.
    tree is {} or {'__path__': <submodule search locations>}.
    inpackage, None or string, is passed to recursive calls of _readmodule.

    The effect of recursive calls is mutation of global _modules.
    r+defrNclass()),r*rJrKimportfrom*_)ioStringIOtokenizegenerate_tokensreadlinernextrr"rappendjoinsplitlenr-rr$r_getnamelistr%r1_getname
StopIterationclose)!r=r'rDrCr>r<rAstackg	tokentypetokenstartZ_end_liner
Z
thisindentr!Zcur_funcZcur_objr#ZinheritnameslevelrncmdZ	cur_classmodulesmodZ_mod2Zn2rrrr;s




















 r;cCstg}xjt|\}}|sP|dkr.t|\}}nd}|||fx |dkr`d|kr`t|d}qBW|dkrPqW|S)zReturn list of (dotted-name, as-name or None) tuples for token source g.

    An as-name is the name that follows 'as' in an as clause.
    asNrK
r+)r]rXrW)rarfrrcZname2rrrr\Bsr\cCsg}t|dd\}}|tkr0|dkr0d|fS||xJt|dd\}}|dkrZPt|dd\}}|tkrxP||q<Wd||fS)zBReturn (dotted-name or None, next-token) tuple for token source g.rrPNr*)rWrrXrY)rapartsrbrcrrrr]Xs
r]c
Csbddl}ytjd}Wnt}YnX|j|rj|j|g}|j|}|	drn|dd}ng}t
||}dd}t||dd	}d
}x|r\|
}t|trqt|dsd|_t|trt|j|dd	}x|D]}	|j||	_qW||t|tr4tdd
|j|j|j|jqt|trtdd
|j|j|jqWdS)z?Print module output (default this file) for quick visual check.rNr+z.pycSst|ddS)Nr
r)getattr)arrr<lambda>yz_main.<locals>.<lambda>T)r(reverserpindentz{}class {} {} {} z{}def {} {})osr.argv__file__r'existsdirnamebasenamelowerendswithrsortedvaluespoprlisthasattrrxr	rextendrprintr2rrr
r)
rzrmr'r>Z
lineno_keyZobjsZindent_levelrZnew_objsr rrr_mainjs@








r__main__)N)N)N)N)rrRr.importlib.utilr3rTrcrrr__all__r-r	rrr"r$rrr%r;r\r]rrrrrr<module>'s,


	
=&