intellecton/venv/lib/python3.12/site-packages/properdocs/__pycache__/plugins.cpython-312.pyc

388 lines
32 KiB
Text
Raw Normal View History

<EFBFBD>
M<>j<>d<00><01>~<00>dZddlmZddlZddlZddlmZddlmZm Z m
Z
m Z m Z m Z mZejdk\r ddlmZmZnddlmZmZerddlZddlmZdd lmZmZmZmZmZer$dd
lmZdd l m!Z!dd l"m#Z#dd l$m%Z%ddl&m'Z'ddl(m)Z)er ddl*m+Z+m,Z,ne Z,e,d<11>Z-e d<12>Z.ej^d<13>Z0d#d<14>Z1e de<19><16>Z2Gd<17>de e2<00>Z3e4d<19>e3jjD<00><00>Z6e6D]Z7e8e3de7z<00><00>d$d<1B>Z9Gd<1C>de e-e.f<00>Z:Gd<1E>de;ee<e3f<00>Z=Gd <20>d!ej|<00>Z?d%d"<22>Z@y)&z)Implements the plugin API for ProperDocs.<2E>)<01> annotationsN)<01>MutableMapping)<07> TYPE_CHECKING<4E>Any<6E>Callable<6C>Generic<69>Literal<61>TypeVar<61>overload)<02><00>
)<02>
EntryPoint<EFBFBD> entry_points)<01>utils)<05>Config<69> ConfigErrors<72>ConfigWarnings<67> LegacyConfig<69>PlainConfigSchema)<01>ProperDocsConfig)<01>LiveReloadServer)<01>Files)<01>
Navigation)<01>Page)<01>TemplateContext)<02> Concatenate<74> ParamSpec<65>P<>Tzproperdocs.pluginsc<01><00>iid<01>}|D]u}t|<01>d<02><02><03>D]a}t|dd<05>jd<06>r<01> |j||vr|jj|<01>d<07><02>r<01>P||||j<<00>c<00>w|d|d zS)
z=Return a dict of all installed Plugins as {name: EntryPoint}.)<02>
properdocs<EFBFBD>mkdocsz.plugins)<01>group<75>value<75>zmkdocs.z .contrib.r"r!)r<00>getattr<74>
startswith<EFBFBD>namer$)<03>
pluginmaps<EFBFBD>prefix<69>plugins <20>U/home/antigravity/intellecton/venv/lib/python3.12/site-packages/properdocs/plugins.py<70> get_pluginsr-/s<><00><00>BD<42>PR<50>3S<33>J<EFBFBD><1C>5<><06>"<22>F<EFBFBD>8<EFBFBD>8<EFBFBD>)<<3C>=<3D> 5<>F<EFBFBD><16>v<EFBFBD>w<EFBFBD><02>+<2B>6<>6<>y<EFBFBD>A<><18><15>{<7B>{<7B>j<EFBFBD><16>0<>0<>V<EFBFBD>\<5C>\<5C>5L<35>5L<35>PV<50>x<EFBFBD>W`<60>Ma<4D>5b<35><18>.4<EFBFBD>J<EFBFBD>v<EFBFBD> <1E>v<EFBFBD>{<7B>{<7B> +<2B>  5<>5<> <16>h<EFBFBD> <1F>*<2A>\<5C>":<3A> :<3A>:<3A><00>
SomeConfig)<01>boundc<01><><00>eZdZUdZeZded<dZded<iZded<d Z d
ed < d#d <0C>Z
d <0A>Z d$ d%d<0F>Z d&d<10>Z d'd<11>Z d(d<12>Zd)d<13>Zd*d<14>Zd+d<15>Z d,d<16>Z d-d<17>Zd*d<18>Zd.d<19>Z d/d<1A>Z d0d<1B>Z d1d<1C>Zd2d<1D>Zd3d<1E>Z d4d<1F>Z d5d <20>Z d6d!<21>Zd7d"<22>Zy)8<>
BasePluginzI
Plugin base class.
All plugins should subclass this class.
ztype[SomeConfig]<5D> config_class<73>r<00> config_schemer/<00>configF<67>bool<6F>supports_multiple_instancesc<01>j<00>|j<00>d|j<00>d<02>}t||ft|<01><03><00>S)z_Eliminates the need to write `config_class = FooConfig` when subclassing BasePlugin[FooConfig].<2E>[<5B>])r3)<03>__name__<5F>type<70>dict)<03>clsr3r(s r,<00>__class_getitem__zBasePlugin.__class_getitem__Ps5<00><00><15>,<2C>,<2C><1E>q<EFBFBD><1C>!6<>!6<> 7<>q<EFBFBD>9<><04><13>D<EFBFBD>3<EFBFBD>&<26>$<24>L<EFBFBD>"A<>B<>Br.c<01><><00>t|jt<00>std|j<00>d<02><03><00>|jtur|jj
|_yy)Nz config_class z6 must be a subclass of `properdocs.config.base.Config`)<07>
issubclassr3r<00> TypeErrorr<00>_schemar5)r?s r,<00>__init_subclass__zBasePlugin.__init_subclass__Us\<00><00><19>#<23>*<2A>*<2A>F<EFBFBD>3<><1B><1F><03> 0<> 0<>1<>1g<31>h<><0E> <0E> <0F> <1B> <1B><<3C> /<2F> #<23> 0<> 0<> 8<> 8<>C<EFBFBD> <1D> 0r.Nc<01><><00>|jturt|j|<02><01>|_n|j|<02><01>|_|jj |<01>|jj <00>S)zJLoad config from a dict of options. Returns a tuple of (errors, warnings).)<01>config_file_path)r3rr5r6<00> load_dict<63>validate)<03>self<6C>optionsrGs r,<00> load_configzBasePlugin.load_config]sb<00><00> <10> <1C> <1C> <0C> ,<2C>&<26>t<EFBFBD>'9<>'9<>L\<5C>]<5D>D<EFBFBD>K<EFBFBD><1E>+<2B>+<2B>=M<>+<2B>N<>D<EFBFBD>K<EFBFBD> <0C> <0B> <0B><1D><1D>g<EFBFBD>&<26><13>{<7B>{<7B>#<23>#<23>%<25>%r.c<01><00>y)a<>
The `startup` event runs once at the very beginning of an `properdocs` invocation.
New in MkDocs 1.4.
The presence of an `on_startup` method (even if empty) migrates the plugin to the new
system where the plugin object is kept across builds within one `properdocs serve`.
Note that for initializing variables, the `__init__` method is still preferred.
For initializing per-build variables (and whenever in doubt), use the `on_config` event.
Args:
command: the command that ProperDocs was invoked with, e.g. "serve" for `properdocs serve`.
dirty: whether `--dirty` flag was passed.
Nr4<00>rJ<00>command<6E>dirtys r,<00>
on_startupzBasePlugin.on_startupl<00><00>r.c<01><00>y)a<>
The `shutdown` event runs once at the very end of an `properdocs` invocation, before exiting.
This event is relevant only for support of `properdocs serve`, otherwise within a
single build it's undistinguishable from `on_post_build`.
New in MkDocs 1.4.
The presence of an `on_shutdown` method (even if empty) migrates the plugin to the new
system where the plugin object is kept across builds within one `properdocs serve`.
Note the `on_post_build` method is still preferred for cleanups, when possible, as it has
a much higher chance of actually triggering. `on_shutdown` is "best effort" because it
relies on detecting a graceful shutdown of ProperDocs.
Nr4<00>rJs r,<00> on_shutdownzBasePlugin.on_shutdown}rRr.c<01><00>|S)av
The `serve` event is only called when the `serve` command is used during
development. It runs only once, after the first build finishes.
It is passed the `Server` instance which can be modified before
it is activated. For example, additional files or directories could be added
to the list of "watched" files for auto-reloading.
Args:
server: `livereload.Server` instance
config: global configuration object
builder: a callable which gets passed to each call to `server.watch`
Returns:
`livereload.Server` instance
r4<00>rJ<00>serverr6<00>builders r,<00>on_servezBasePlugin.on_serve<76>s <00><00>$<16> r.c<01><00>|S)aP
The `config` event is the first event called on build and is run immediately
after the user configuration is loaded and validated. Any alterations to the
config should be made here.
Args:
config: global configuration object
Returns:
global configuration object
r4<00>rJr6s r,<00> on_configzBasePlugin.on_config<69>s <00><00><16> r.c<01><00>y)z<>
The `pre_build` event does not alter any variables. Use this event to call
pre-build scripts.
Args:
config: global configuration object
Nr4r\s r,<00> on_pre_buildzBasePlugin.on_pre_build<6C>rRr.c<01><00>|S)a
The `files` event is called after the files collection is populated from the
`docs_dir`. Use this event to add, remove, or alter files in the
collection. Note that Page objects have not yet been associated with the
file objects in the collection. Use [Page Events](plugins.md#page-events) to manipulate page
specific data.
Args:
files: global files collection
config: global configuration object
Returns:
global files collection
r4<00>rJ<00>filesr6s r,<00>on_fileszBasePlugin.on_files<65>s <00><00><15> r.c<01><00>|S)aQ
The `nav` event is called after the site navigation is created and can
be used to alter the site navigation.
Args:
nav: global navigation object
config: global configuration object
files: global files collection
Returns:
global navigation object
r4<00>rJ<00>navr6rbs r,<00>on_navzBasePlugin.on_nav<61>s <00><00><13>
r.c<01><00>|S)a<>
The `env` event is called after the Jinja template environment is created
and can be used to alter the
[Jinja environment](https://jinja.palletsprojects.com/en/latest/api/#jinja2.Environment).
Args:
env: global Jinja environment
config: global configuration object
files: global files collection
Returns:
global Jinja Environment
r4<00>rJ<00>envr6rbs r,<00>on_envzBasePlugin.on_env<6E>s <00><00> <13>
r.c<01><00>y)z<>
The `post_build` event does not alter any variables. Use this event to call
post-build scripts.
Args:
config: global configuration object
Nr4r\s r,<00> on_post_buildzBasePlugin.on_post_build<6C>rRr.c<01><00>y)a<>
The `build_error` event is called after an exception of any kind
is caught by ProperDocs during the build process.
Use this event to clean things up before ProperDocs terminates. Note that any other
events which were scheduled to run after the error will have been skipped. See
[Handling Errors](plugins.md#handling-errors) for more details.
Args:
error: exception raised
Nr4<00>rJ<00>errors r,<00>on_build_errorzBasePlugin.on_build_error<6F>rRr.c<01><00>|S)a<>
The `pre_template` event is called immediately after the subject template is
loaded and can be used to alter the template.
Args:
template: a Jinja2 [Template](https://jinja.palletsprojects.com/en/latest/api/#jinja2.Template) object
template_name: string filename of template
config: global configuration object
Returns:
a Jinja2 [Template](https://jinja.palletsprojects.com/en/latest/api/#jinja2.Template) object
r4<00>rJ<00>template<74> template_namer6s r,<00>on_pre_templatezBasePlugin.on_pre_templates <00><00><18>r.c<01><00>|S)a<>
The `template_context` event is called immediately after the context is created
for the subject template and can be used to alter the context for that specific
template only.
Args:
context: dict of template context variables
template_name: string filename of template
config: global configuration object
Returns:
dict of template context variables
r4<00>rJ<00>contextrur6s r,<00>on_template_contextzBasePlugin.on_template_context<00> <00><00> <17>r.c<01><00>|S)a
The `post_template` event is called after the template is rendered, but before
it is written to disc and can be used to alter the output of the template.
If an empty string is returned, the template is skipped and nothing is is
written to disc.
Args:
output_content: output of rendered template as string
template_name: string filename of template
config: global configuration object
Returns:
output of rendered template as string
r4<00>rJ<00>output_contentrur6s r,<00>on_post_templatezBasePlugin.on_post_template)s
<00><00>"<1E>r.c<01><00>|S)a<>
The `pre_page` event is called before any actions are taken on the subject
page and can be used to alter the `Page` instance.
Args:
page: `properdocs.structure.pages.Page` instance
config: global configuration object
files: global files collection
Returns:
`properdocs.structure.pages.Page` instance
r4<00>rJ<00>pager6rbs r,<00> on_pre_pagezBasePlugin.on_pre_page>s <00><00><14> r.c<01><00>y)a<>
> DEPRECATED: Instead of this event, prefer one of these alternatives:
>
> * Since ProperDocs 1.6, instead set `content_bytes`/`content_string` of a `File` inside [`on_files`][].
> * Usually (although it's not an exact alternative), `on_page_markdown` can serve the same purpose.
The `on_page_read_source` event can replace the default mechanism to read
the contents of a page's source from the filesystem.
Args:
page: `properdocs.structure.pages.Page` instance
config: global configuration object
Returns:
The raw source for a page as unicode string. If `None` is returned, the
default loading from a file will be performed.
Nr4<00>rJr<>r6s r,<00>on_page_read_sourcezBasePlugin.on_page_read_sourceMs<00><00>$r.c<01><00>|S)a#
The `page_markdown` event is called after the page's markdown is loaded
from file and can be used to alter the Markdown source text. The meta-
data has been stripped off and is available as `page.meta` at this point.
Args:
markdown: Markdown source text of page as string
page: `properdocs.structure.pages.Page` instance
config: global configuration object
files: global files collection
Returns:
Markdown source text of page as string
r4<00>rJ<00>markdownr<6E>r6rbs r,<00>on_page_markdownzBasePlugin.on_page_markdownas <00><00>"<18>r.c<01><00>|S)a<>
The `page_content` event is called after the Markdown text is rendered to
HTML (but before being passed to a template) and can be used to alter the
HTML body of the page.
Args:
html: HTML rendered from Markdown source as string
page: `properdocs.structure.pages.Page` instance
config: global configuration object
files: global files collection
Returns:
HTML rendered from Markdown source as string
r4<00>rJ<00>htmlr<6C>r6rbs r,<00>on_page_contentzBasePlugin.on_page_contentts <00><00>"<14> r.c<01><00>|S)a<>
The `page_context` event is called after the context for a page is created
and can be used to alter the context for that specific page only.
Args:
context: dict of template context variables
page: `properdocs.structure.pages.Page` instance
config: global configuration object
nav: global navigation object
Returns:
dict of template context variables
r4<00>rJryr<>r6rfs r,<00>on_page_contextzBasePlugin.on_page_context<78>r{r.c<01><00>|S)a 
The `post_page` event is called after the template is rendered, but
before it is written to disc and can be used to alter the output of the
page. If an empty string is returned, the page is skipped and nothing is
written to disc.
Args:
output: output of rendered template as string
page: `properdocs.structure.pages.Page` instance
config: global configuration object
Returns:
output of rendered template as string
r4<00>rJ<00>outputr<74>r6s r,<00> on_post_pagezBasePlugin.on_post_page<67>s <00><00><16> r.)r3z type[Config]<5D>N)rKzdict[str, Any]rG<00>
str | None<6E>returnz#tuple[ConfigErrors, ConfigWarnings]<5D>rOz&Literal['build', 'gh-deploy', 'serve']rPr7r<><00>None<6E>r<>r<>)rXrr6rrYrr<>zLiveReloadServer | None)r6rr<>zProperDocsConfig | None<6E>r6rr<>r<>)rbrr6rr<>z Files | None)rfrr6rrbrr<>zNavigation | None)rj<00>jinja2.Environmentr6rrbrr<>zjinja2.Environment | None<6E>rp<00> Exceptionr<6E>r<>)rt<00>jinja2.Templateru<00>strr6rr<>zjinja2.Template | None)ryrrur<>r6rr<><00>TemplateContext | None)r~r<>rur<>r6rr<>r<>)r<>rr6rrbrr<>z Page | None<6E>r<>rr6rr<>r<>)
r<EFBFBD>r<>r<>rr6rrbrr<>r<>)
r<EFBFBD>r<>r<>rr6rrbrr<>r<>)
ryrr<>rr6rrfrr<>r<>)r<>r<>r<>rr6rr<>r<>) r<<00>
__module__<EFBFBD> __qualname__<5F>__doc__rr3<00>__annotations__r5r6r8r@rErLrQrUrZr]r_rcrgrkrmrqrvrzrr<>r<>r<>r<>r<>r<>r4r.r,r2r2Bs<><00><00><08> &2<>L<EFBFBD>"<22>1<>')<29>M<EFBFBD>$<24>)<29><1B>F<EFBFBD>J<EFBFBD><1B>(-<2D><1F><14>-<2D>a<>C<01>
9<>GK<01> &<26>%<25> &<26>9C<39> &<26> ,<2C> &<26> <0C>" <0C>"<16>&<26><16>6F<36><16>QY<51><16> <20><16>, <16> <0C><15>"<13><1D><13>-=<3D><13>FK<46><13> <1A><13>"<13>%<25><13>5E<35><13>NS<4E><13> "<22><13>$ <0C>
 <0C><18>'<27><18>>A<><18>K[<5B><18> <1F><18>"<17>&<26><17>=@<40><17>JZ<4A><17> <1F><17>$<1E>!<21><1E>8;<3B><1E>EU<45><1E> <13><1E>* <14><14>(<18><1B><18>)-<2D><18>7G<37><18>PU<50><18> <13><18>&<14><17><14>%)<29><14>3C<33><14>LQ<4C><14> <13><14>&<17>&<26><17>48<34><17>BR<42><17>Yc<59><17> <1F><17>$r.r2c#<01>JK<00>|]}|jd<00>s<01>|dd<00><01><00>y<02>w)<03>on_r N<>r')<02>.0<EFBFBD>ks r,<00> <genexpr>r<><00>s!<00><00><><00>I<><11>Q<EFBFBD>\<5C>\<5C>%<25>5H<35>q<EFBFBD><11><12>u<EFBFBD>I<>s<00>#<01>
#r<>c<01><00><00><00>fd<01>}|S)a<>
A decorator to set an event priority for an event handler method.
Recommended priority values:
`100` "first", `50` "early", `0` "default", `-50` "late", `-100` "last".
As different plugins discover more precise relations to each other, the values should be further tweaked.
Usage example:
```python
@plugins.event_priority(-100) # Wishing to run this after all other plugins' `on_files` events.
def on_files(self, files, config, **kwargs):
...
```
New in MkDocs 1.4.
Recommended shim for backwards compatibility:
```python
try:
from properdocs.plugins import event_priority
except ImportError:
event_priority = lambda priority: lambda f: f # No-op fallback
```
c<01><00><01><00>|_|Sr<>)<01>mkdocs_priority)<02> event_method<6F>prioritys <20>r,<00> decoratorz!event_priority.<locals>.decorator<6F>s<00><><00>'/<2F> <0C>$<24><1B>r.r4)r<>r<>s` r,<00>event_priorityr<79><00>s<00><><00>6<1C> <15>r.c<01>(<00>eZdZdZdd<02>Zdd<03>Zdd<05>Zy) <09> CombinedEventa`
A descriptor that allows defining multiple event handlers and declaring them under one event's name.
Usage example:
```python
@plugins.event_priority(100)
def _on_page_markdown_1(self, markdown: str, **kwargs):
...
@plugins.event_priority(-50)
def _on_page_markdown_2(self, markdown: str, **kwargs):
...
on_page_markdown = plugins.CombinedEvent(_on_page_markdown_1, _on_page_markdown_2)
```
NOTE: The names of the sub-methods **can't** start with `on_`;
instead they can start with `_on_` like in the the above example, or anything else.
c<01><00>||_yr<>)<01>methods)rJr<>s r,<00>__init__zCombinedEvent.__init__<5F>s <00><00><1E><04> r.c<01>D<00>tt|<00>j<00>d<01><02><00>)Nz object is not callable)rCr=r<)rJ<00>instance<63>args<67>kwargss r,<00>__call__zCombinedEvent.__call__<5F>s <00><00><17>4<EFBFBD><04>:<3A>.<2E>.<2E>1<>1H<31>I<>J<>Jr.Nc<01>><00><01><02>t<00><01>fd<01>|jD<00><00>S)Nc3<01>B<00>K<00>|]}|j<00><02><03><00><01><00>y<00>wr<>)<01>__get__)r<><00>fr<66><00>owners <20><>r,r<>z(CombinedEvent.__get__.<locals>.<genexpr><3E>s<00><><00><><00>P<>a<EFBFBD>q<EFBFBD>y<EFBFBD>y<EFBFBD><18>5<EFBFBD>9<>P<>s<00>)r<>r<>)rJr<>r<>s ``r,r<>zCombinedEvent.__get__<5F>s<00><><00><1C>P<>4<EFBFBD><<3C><<3C>P<>Q<>Qr.)r<>z Callable[Concatenate[Any, P], T])r<>r2r<>zP.argsr<73>zP.kwargsr<73>rr<>)r<r<>r<>r<>r<>r<>r<>r4r.r,r<>r<><00>s<00><00><08>*<1F>K<01>Rr.r<>c<01><><00><00>eZdZUdZded<d<1E>fd<04> Z d d d<05>Zd!<21>fd<06> Zd"<22>fd<07> Ze d#d<08><04>Z
e d$d <09><04>Z
dd%d
<EFBFBD>Z
d&d <0B>Z dd <0C>Z d'd <0A>Z d(d<0E>Zd)d<0F>Zd*d<10>Zd+d<11>Zd,d<12>Zd)d<13>Zd-d<14>Z d.d<15>Z d/d<16>Z d0d<17>Zd1d<18>Zd2d<19>Z d3d<1A>Z d4d<1B>Z d5d<1C>Zd6d<1D>Z<1D>xZS)7<>PluginCollectionz<6E>
A collection of plugins.
In addition to being a dict of Plugin instances, each event method is registered
upon being added. All registered methods for a given event can then be run in order
by calling `run_event`.
r<><00>_current_pluginc<01>p<00><01>t<00>|<00>|i|<02><01>tD<00>cic]}|g<00><02>c}|_i|_ycc}wr<>)<05>superr<72><00>EVENTS<54>events<74>_event_origins)rJr<>r<>r<><00> __class__s <20>r,r<>zPluginCollection.__init__s9<00><><00> <0A><07><18>$<24>)<29>&<26>)<29>AG<41>1H<31>A<EFBFBD>!<21>R<EFBFBD>%<25>1H<31><04> <0B>35<33><04><1B><>2Is<00>
3c<01><><00>t|t<00>r&|jD]}|j|||<03><01><00>y
|j|}|dk(r^t |<05>dk(rP|j jtt|<05><00>d<04>}|xsd}tjd|<06>d|<07>d<07><05>tj||d<08><00> <09>|r ||j |<y
y
#t$rYy
wxYw) zRegister a method for an event.<2E><01> plugin_name<6D>page_read_source<63><00> <unknown>zBMultiple 'on_page_read_source' handlers can't work (both plugins 'z' and 'z' registered one).c<01><00>t|dd<02> S)Nr<4E>r)r&)<01>ms r,<00><lambda>z2PluginCollection._register_event.<locals>.<lambda>s<00><00><07><01>CT<43>VW<56>8X<38>7X<37>r.)<01>keyN)<0F>
isinstancer<EFBFBD>r<><00>_register_eventr<74><00>lenr<6E><00>get<65>next<78>iter<65>log<6F>warningr<00>insortrC)rJ<00>
event_name<EFBFBD>methodr<64><00>subr<62><00>plugin1<6E>plugin2s r,r<>z PluginCollection._register_events<><00><00> <16>f<EFBFBD>m<EFBFBD> ,<2C><1D>~<7E>~<7E> O<01><03><14>$<24>$<24>Z<EFBFBD><13>+<2B>$<24>N<> O<01><1A>[<5B>[<5B><1A>,<2C>F<EFBFBD><19>/<2F>/<2F>C<EFBFBD><06>K<EFBFBD>1<EFBFBD>4D<34><1E>-<2D>-<2D>1<>1<>$<24>t<EFBFBD>F<EFBFBD>|<7C>2D<32>k<EFBFBD>R<><07>%<25>4<><1B><07><13> <0B> <0B>&<26>&-<2D>Y<EFBFBD>g<EFBFBD>g<EFBFBD>Y<EFBFBD>>P<>R<01><12> <12>L<EFBFBD>L<EFBFBD><16><16>-X<> Y<><1A><19>2=<3D>D<EFBFBD>'<27>'<27><06>/<2F><1B><>!<21><19><18><19>s<00>C<00> C"<03>!C"c<01>"<00><01>t<00>|<00>|<01>Sr<>)r<><00> __getitem__)rJr<>r<>s <20>r,r<>zPluginCollection.__getitem__s<00><><00><14>w<EFBFBD>"<22>3<EFBFBD>'<27>'r.c<01><><00><01>t<00>|<00>||<02>d<01>t|<02>D<00>D]2}t||d<00>}t |<04>s<01>|j |dd||<01><03><00>4y)Nc3<01>DK<00>|]}|jd<00>s<01>|<01><01><00>y<01>w)r<>Nr<4E>)r<><00>xs r,r<>z/PluginCollection.__setitem__.<locals>.<genexpr>"s<00><00><><00>H<><11>A<EFBFBD>L<EFBFBD>L<EFBFBD><15>4G<34>1<EFBFBD>H<>s<00> <01> r r<>)r<><00> __setitem__<5F>dirr&<00>callabler<65>)rJr<>r$r<>r<>r<>s <20>r,r<>zPluginCollection.__setitem__s]<00><><00> <0A><07><1B>C<EFBFBD><15>'<27>H<>c<EFBFBD>%<25>j<EFBFBD>H<> N<01>J<EFBFBD><1C>U<EFBFBD>J<EFBFBD><04>5<>F<EFBFBD><17><06><1F><14>$<24>$<24>Z<EFBFBD><01><02>^<5E>V<EFBFBD><13>$<24>M<> Nr.c <01><00>yr<>r4)rJr(r<>s r,<00> run_eventzPluginCollection.run_event's<00><00>58r.c <01><00>yr<>r4)rJr(<00>itemr<6D>s r,r<>zPluginCollection.run_event*s<00><00><?r.c <01>N<00>|du}|j|D]<5D>}|jj|d<02>|_tj <00>t jkr&tjd|<01>d|j<00>d<05><05>|r
||fi|<03><01>}n|di|<03><01>}|<06><01><>|}<02><>d|_|S)a[
Run all registered methods of an event.
`item` is the object to be modified or replaced and returned by the event method.
If it isn't given the event method creates a new object to be returned.
All other keywords are variables for context, but would not generally
be modified by the event method.
Nr<4E>z Running `z` event from plugin '<27>'r4) r<>r<>r<>r<>r<><00>getEffectiveLevel<65>logging<6E>DEBUG<55>debug)rJr(r<>r<><00> pass_itemr<6D><00>results r,r<>zPluginCollection.run_event-s<><00><00><19><04>$<24> <09><1A>k<EFBFBD>k<EFBFBD>$<24>'<27>
<1E>F<EFBFBD>#'<27>#6<>#6<>#:<3A>#:<3A>6<EFBFBD>;<3B>#O<>D<EFBFBD> <20><12>$<24>$<24>&<26>'<27>-<2D>-<2D>7<><13> <09> <09>I<EFBFBD>d<EFBFBD>V<EFBFBD>+@<40><14>AU<41>AU<41>@V<>VW<56>X<>Y<><18><1F><04>/<2F><06>/<2F><06><1F>)<29>&<26>)<29><06><15>!<21><1D><04>
<1E> $<24><04><1C><13> r.c<01>*<00>|jd||<02><02>S)N<>startup)rOrP<00>r<>rNs r,rQzPluginCollection.on_startupEs<00><00><13>~<7E>~<7E>i<EFBFBD><17><05>~<7E>F<>Fr.c<01>$<00>|jd<01>S)N<>shutdownr<6E>rTs r,rUzPluginCollection.on_shutdownHs<00><00><13>~<7E>~<7E>j<EFBFBD>)<29>)r.c<01>,<00>|jd|||<03><02>S)N<>serve)r6rYr<>rWs r,rZzPluginCollection.on_serveKs<00><00><14>~<7E>~<7E>g<EFBFBD>v<EFBFBD>f<EFBFBD>g<EFBFBD>~<7E>N<>Nr.c<01>&<00>|jd|<01>S)Nr6r<>r\s r,r]zPluginCollection.on_configPs<00><00><13>~<7E>~<7E>h<EFBFBD><06>/<2F>/r.c<01>(<00>|jd|<01><02>S)N<> pre_build<6C>r6r<>r\s r,r_zPluginCollection.on_pre_buildSs<00><00><13>~<7E>~<7E>k<EFBFBD>&<26>~<7E>9<>9r.c<01>*<00>|jd||<02><02>S)Nrbrr<>ras r,rczPluginCollection.on_filesVs<00><00><13>~<7E>~<7E>g<EFBFBD>u<EFBFBD>V<EFBFBD>~<7E><<3C><r.c<01>,<00>|jd|||<03><02>S)Nrf<00>r6rbr<>res r,rgzPluginCollection.on_navY<00><00><00><13>~<7E>~<7E>e<EFBFBD>S<EFBFBD><16>u<EFBFBD>~<7E>E<>Er.c<01>,<00>|jd|||<03><02>S)Nrjrr<>ris r,rkzPluginCollection.on_env\rr.c<01>(<00>|jd|<01><02>S)N<>
post_buildrr<>r\s r,rmzPluginCollection.on_post_build_s<00><00><13>~<7E>~<7E>l<EFBFBD>6<EFBFBD>~<7E>:<3A>:r.c<01>(<00>|jd|<01><02>S)N<> build_error)rpr<>ros r,rqzPluginCollection.on_build_errorbs<00><00><13>~<7E>~<7E>m<EFBFBD>5<EFBFBD>~<7E>9<>9r.c<01>,<00>|jd|||<03><02>S)N<> pre_template<74>rur6r<>rss r,rvz PluginCollection.on_pre_templatees<00><00><14>~<7E>~<7E>n<EFBFBD>h<EFBFBD>m<EFBFBD>\b<>~<7E>c<>cr.c<01>,<00>|jd|||<03><02>S)N<>template_contextrr<>rxs r,rzz$PluginCollection.on_template_contextjs#<00><00><14>~<7E>~<7E> <1E><07>}<7D>V<EFBFBD><1E>
<EFBFBD>
r.c<01>,<00>|jd|||<03><02>S)N<> post_templaterr<>r}s r,rz!PluginCollection.on_post_templateqs$<00><00><14>~<7E>~<7E> <1B>^<5E>=<3D>QW<51><1E>
<EFBFBD>
r.c<01>,<00>|jd|||<03><02>S)N<>pre_pagerr<>r<>s r,r<>zPluginCollection.on_pre_pagexs<00><00><13>~<7E>~<7E>j<EFBFBD>$<24>v<EFBFBD>U<EFBFBD>~<7E>K<>Kr.c<01>*<00>|jd||<02><02>S)Nr<4E><00>r<>r6r<>r<>s r,r<>z$PluginCollection.on_page_read_source{s<00><00><13>~<7E>~<7E>0<>t<EFBFBD>F<EFBFBD>~<7E>K<>Kr.c<01>.<00>|jd||||<04><02>S)N<> page_markdown<77>r<>r6rbr<>r<>s r,r<>z!PluginCollection.on_page_markdown~s<00><00><14>~<7E>~<7E>o<EFBFBD>x<EFBFBD>d<EFBFBD>6<EFBFBD>Y^<5E>~<7E>_<>_r.c<01>.<00>|jd||||<04><02>S)N<> page_contentrr<>r<>s r,r<>z PluginCollection.on_page_content<6E>s<00><00><14>~<7E>~<7E>n<EFBFBD>d<EFBFBD><14>f<EFBFBD>TY<54>~<7E>Z<>Zr.c<01>.<00>|jd||||<04><02>S)N<> page_context)r<>r6rfr<>r<>s r,r<>z PluginCollection.on_page_context<78>s<00><00><14>~<7E>~<7E>n<EFBFBD>g<EFBFBD>D<EFBFBD><16>UX<55>~<7E>Y<>Yr.c<01>,<00>|jd|||<03><02>S)N<> post_pagerr<>r<>s r,r<>zPluginCollection.on_post_page<67>s<00><00><13>~<7E>~<7E>k<EFBFBD>6<EFBFBD><04>V<EFBFBD>~<7E>L<>Lr.r<>r<>)r<>r<>r<>zCombinedEvent | Callabler<65>r<>r<>r<>)r<>r<>r<>r2)r<>r<>r$r2r<>r<>)r(r<>r<>r)r(r<>r<>rr<>r)r(r<>r<>)rXrr6rrYrr<>r)r6rr<>rr<>)rbrr6rr<>r)rfrr6rrbrr<>r)rjr<>r6rrbrr<>)rtr<>rur<>r6rr<>r<>)ryrrur<>r6rr<>r)r~r<>rur<>r6rr<>r<>)r<>rr6rrbrr<>rr<>)
r<EFBFBD>r<>r<>rr6rrbrr<>r<>)
r<EFBFBD>r<>r<>rr6rrbrr<>r<>)
ryrr<>rr6rrfrr<>r)r<>r<>r<>rr6rr<>r<>)r<r<>r<>r<>r<>r<>r<>r<>r<>r r<>rQrUrZr]r_rcrgrkrmrqrvrzrr<>r<>r<>r<>r<>r<><00> __classcell__<5F>r<>s@r,r<>r<><00>s<><00><><00><08> <20><1F>6<> \`<01><19><1D><19>'?<3F><19>NX<4E><19> <0A><19>.(<28>N<01><0E>8<><0E>8<> <0A>?<3F><0E>?<3F><14>0G<01>*<2A>O<01>&<26>O<01>3C<33>O<01>NV<4E>O<01> <19>O<01>
0<>:<3A>=<3D>F<01>F<01>;<3B>:<3A>d<01>'<27>d<01>;><3E>d<01>HX<48>d<01> <18>d<01>

<EFBFBD>&<26>
<EFBFBD>:=<3D>
<EFBFBD>GW<EFBFBD>
<EFBFBD> <18>
<EFBFBD>
<EFBFBD>!<21>
<EFBFBD>58<EFBFBD>
<EFBFBD>BR<EFBFBD>
<EFBFBD> <0C>
<EFBFBD>L<01>L<01>`<01><1B>`<01>&*<2A>`<01>4D<34>`<01>MR<4D>`<01> <0C>`<01>
[<01><17>[<01>"&<26>[<01>0@<40>[<01>IN<49>[<01> <0C>[<01>
Z<01>&<26>Z<01>15<31>Z<01>?O<>Z<01>V`<60>Z<01> <18>Z<01>
Mr.r<>c<01>,<00><00>eZdZdZd<04>fd<02> Zdd<03>Z<05>xZS)<06>PrefixedLoggerz(A logger adapter to prefix log messages.c<01>4<00><01>t<00>|<00>|i<00>||_y)z<>
Initialize the logger adapter.
Arguments:
prefix: The string to insert in front of every message.
logger: The logger instance.
N)r<>r<>r*)rJr*<00>loggerr<72>s <20>r,r<>zPrefixedLogger.__init__<5F>s<00><><00> <0E><07><18><16><12>$<24><1C><04> r.c<01>(<00>|j<00>d|<01><00>|fS)z<>
Process the message.
Arguments:
msg: The message:
kwargs: Remaining arguments.
Returns:
The processed message.
z: )r*)rJ<00>msgr<67>s r,<00>processzPrefixedLogger.process<73>s<00><00><17>+<2B>+<2B><1D>b<EFBFBD><13><05>&<26><06>.<2E>.r.)r*r<>r&zlogging.Loggerr<72>r<>)r(r<>r<>zMutableMapping[str, Any]r<>ztuple[str, Any])r<r<>r<>r<>r<>r)r!r"s@r,r$r$<00>s<00><><00>2<> <1D> /r.r$c<01>p<00>tjd|<00><00><02>}t|jdd<03>d|<01>S)a<>
Return a logger for plugins.
Arguments:
name: The name to use with `logging.getLogger`.
Returns:
A logger configured to work well in ProperDocs,
prefixing each message with the plugin package name.
Example:
```python
from properdocs.plugins import get_plugin_logger
log = get_plugin_logger(__name__)
log.info("My plugin message")
```
zproperdocs.plugins.<2E>.r<>r)r<><00> getLoggerr$<00>split)r(r&s r,<00>get_plugin_loggerr.<00>s9<00><00>&<15> <1E> <1E>!4<>T<EFBFBD>F<EFBFBD>;<3B> <<3C>F<EFBFBD> <19>$<24>*<2A>*<2A>S<EFBFBD>!<21>,<2C>Q<EFBFBD>/<2F><16> 8<>8r.)r<>zdict[str, EntryPoint])r<><00>floatr<74>zCallable[[T], T])r(r<>r<>r$)Ar<41><00>
__future__rr<><00>sys<79>collections.abcr<00>typingrrrrr r
r <00> version_info<66>importlib.metadatarr<00>importlib_metadata<74>jinja2.environment<6E>jinja2r!r<00>properdocs.config.baserrrrr<00>properdocs.config.defaultsr<00>properdocs.livereloadr<00>properdocs.structure.filesr<00>properdocs.structure.navr<00>properdocs.structure.pagesr<00>properdocs.utils.templatesr<00>typing_extensionsrrrrr,r<>r-r/r2<00>tuple<6C>__dict__r<5F>r<><00>delattrr<72>r<>r>r<>r<><00> LoggerAdapterr$r.r4r.r,<00><module>rEsA<00><01>/<2F>"<22><0E>
<EFBFBD>*<2A>T<>T<>T<><06><13><13>w<EFBFBD><1E>;<3B>;<3B>;<3B><10><1D><1C><02><02><11>;<3B>6<>0<>3<>/<2F>:<3A><10>8<>8<><17>I<EFBFBD> <0A>c<EFBFBD>N<EFBFBD><01> <0B>C<EFBFBD>L<EFBFBD><01><18>g<EFBFBD><17><17>,<2C>-<2D><03> ;<3B> <15>\<5C><16> 0<>
<EFBFBD>f<16><17><1A>$<24>f<16>R
<0F>I<>j<EFBFBD>1<>1<>I<> I<><06>
<10>#<23>A<EFBFBD> <0B>J<EFBFBD><05><01> <09>"<22>#<23><15>DR<01>G<EFBFBD>A<EFBFBD>q<EFBFBD>D<EFBFBD>M<EFBFBD>R<01>BYM<01>t<EFBFBD>^<5E>C<EFBFBD><1A>O<EFBFBD><<3C>YM<01>x/<2F>W<EFBFBD>*<2A>*<2A>/<2F>89r.