/opt/alt/python37/lib/python3.7/site-packages/nose/sphinx/__pycache__
Edit: /opt/alt/python37/lib/python3.7/site-packages/nose/sphinx/__pycache__/pluginopts.cpython-37.pyc (5136B)
B
kž6S ã @ sÒ d Z ddlZy,ddlmZmZ ddlmZ ddlmZ W n e k
rL Y nX ddl
mZ ddlm
Z
ddlmZ dd lmZ dd
lmZ ddlmZ dd
„ Zdd„ ZG dd„ deƒZG dd„ deƒZdd„ ZdS )aÊ
Adds a sphinx directive that can be used to automatically document a plugin.
this::
.. autoplugin :: nose.plugins.foo
:plugin: Pluggy
produces::
.. automodule :: nose.plugins.foo
Options
-------
.. cmdoption :: --foo=BAR, --fooble=BAR
Do the foo thing to the new thing.
Plugin
------
.. autoclass :: nose.plugins.foo.Pluggy
:members:
Source
------
.. include :: path/to/nose/plugins/foo.py
:literal:
é N)ÚnodesÚutils)ÚViewList)Ú
directives)Úresolve_name)ÚPlugin)ÚBuiltinPluginManager)ÚConfig)ÚTestProgram)Úisclassc C s* |d } t | ƒ}
| dd ¡}|r,t|
|ƒ}nDxBt|
ƒD ]6}
t|
|
ƒ}t|ƒr6t|tƒr6|tk r6d| |
f }P q6W tƒ }| d| d¡ | dd¡ | dd¡ | dd¡ | dd¡ |ƒ }t ƒ }|
|i ¡ xJ|D ]B}| |
¡ d¡ | d d¡ | d
|j d d¡ | dd¡ qÔW | dd¡ | d
d¡ | dd¡ | d| d¡ | dd¡ | dd¡ | dd¡ | dd¡ | d
d¡ | dt
|jd tj |
j dd¡¡¡ d¡ | dd¡ | dd¡ t ¡ }|j|_|jj}|jj}g |j_d|j_|j|d|dd ||j_||j_|jS )Nr Úpluginz%s.%sz.. automodule :: %s
z
Ú ÚOptionsz-------z
z Ú
r z------z.. autoclass :: %s
z
:members:
z :show-inheritance:
ZSourcez.. include :: %s
Úsourcez.pycz.pyz
:literal:
é )Úmatch_titles)r ÚgetÚgetattrÚdirr Ú
issubclassr r ÚappendÚ OptBucketÚoptionsÚhelpr Z
relative_pathÚdocumentÚosÚpathÚabspathÚ__file__Úreplacer ÚsectionÚmemoÚtitle_stylesÚ
section_levelÚnested_parseÚchildren)ÚdirnameÚ argumentsr ÚcontentÚlinenoÚcontent_offsetÚ
block_textÚstateÚ
state_machineZmod_nameÚmodZ plug_nameÚobjÚentryÚrstZplugÚoptsÚoptÚnodeÚsurrounding_title_stylesÚsurrounding_section_level© r8 úG/opt/alt/python37/lib/python3.7/site-packages/nose/sphinx/pluginopts.pyÚautoplugin_directive1 sd
r: c C s t ttƒ d} | t ¡ ¡}
tƒ }x"|
¡ d¡D ]}| |d¡ q2W | dd¡ | dd¡ | dd¡ xJ|
D ]B}
| |
¡ d¡ | dd¡ | d|
j d d¡ | dd¡ qpW t
¡ }|j|_|jj}|jj}g |j_d |j_|j|d |d
d ||j_||j_|jS )zproduces rst from nose help)ZparserClassZpluginsr z r z-------r
z
z r r )r )r r r Z getParserr
Zusager Úformat_helpÚsplitr r r r r! r r" r# r$ r% r&