+
    iK                        ^ RI Ht ^ RIHt ^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RIH
t
 ^ RIHt ^RIHt ^R	IHt ^R
IHt ]'       d   ^RIHt / t]P$                  ! ]4      t ! R R4      tR R ltR R lt]! 4        R# )    )annotations)metadataN)
ModuleType)Callable)Pattern)TYPE_CHECKING)util)DispatchPriority)PriorityDispatcher)PriorityDispatchResultc                      ] tR t^tRtR R ltR R ltRRRR	]P                  /R
 R lllt	]
R R l4       t]
R R l4       tRtR# )Plugina  Describe a series of functions that are pulled in as a plugin.

This is initially to provide for portable lists of autogenerate
comparison functions, however the setup for a plugin can run any
other kinds of global registration as well.

.. versionadded:: 1.18.0

c                   V ^8  d   QhRR/# )   namestr )formats   "qC:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO\maestro-backend\venv\Lib\site-packages\alembic/runtime/plugins.py__annotate__Plugin.__annotate__#   s     = =S =    c                	    Wn         \        P                  R V4       V\        9   d   \	        RV R24      hV \        V&   \        4       V n        R# )zsetup plugin %szA plugin named z is already registeredN)r   loginfo_all_plugins
ValueErrorr   autogenerate_comparators)selfr   s   &&r   __init__Plugin.__init__#   sH    	"D)<tf4JKLL!T(:(<%r   c                   V ^8  d   QhRR/# r   returnNoner   )r   s   "r   r   r   +   s     $ $ $r   c                (    \         V P                   R# )zremove this pluginN)r   r   )r   s   &r   removePlugin.remove+   s     #r   N	qualifierdefaultpriorityc               0    V ^8  d   QhRRRRRRRRRR	R
R/# )r   fnz%Callable[..., PriorityDispatchResult]compare_targetr   compare_elementz
str | Noner)   r+   r
   r$   r%   r   )r   s   "r   r   r   0   sF     ' '1' ' $	' ' #' 
'r   c               P    V P                   P                  VVVVR7      ! V4       R# )a  Register an autogenerate comparison function.

See the section :ref:`plugins_registering_autogenerate` for detailed
examples on how to use this method.

:param fn: The comparison function to register. The function receives
 arguments specific to the type of comparison being performed and
 should return a :class:`.PriorityDispatchResult` value.

:param compare_target: The type of comparison being performed
 (e.g., ``"table"``, ``"column"``, ``"type"``).

:param compare_element: Optional sub-element being compared within
 the target type.

:param qualifier: Database dialect qualifier. Use ``"default"`` for
 all dialects, or specify a dialect name like ``"postgresql"`` to
 register a dialect-specific handler. Defaults to ``"default"``.

:param priority: Execution priority for this comparison function.
 Functions are executed in priority order from
 :attr:`.DispatchPriority.FIRST` to :attr:`.DispatchPriority.LAST`.
 Defaults to :attr:`.DispatchPriority.MEDIUM`.

)subgroupr+   r)   N)r   dispatch_for)r   r-   r.   r/   r)   r+   s   &&&&$$r   add_autogenerate_comparator"Plugin.add_autogenerate_comparator0   s4    D 	%%22$	 	3 	

 	r   c               $    V ^8  d   QhRRRRRR/# )r   comparatorsr   include_pluginsz	list[str]r$   r%   r   )r   s   "r   r   r   Z   s$     $ $,$?H$	$r   c                L  a
 \        4       p/ p\        4       pV FJ  pVP                  R4      '       d$   VP                  \        VR,          4      4       K=  \        V4      WF&   KL  	  \        P                  4        F  o
\        ;QJ d    V
3R lV 4       F  '       g   K   RM	  RM! V
3R lV 4       4      '       d   KE  V Uu. uF.  qtV,          P                  S
P                  4      '       g   K,  VNK0  	  ppV'       g   K  VP                  V4       \        P                  RS
P                  4       VP                  S
P                  4       K  	  \        V4      P                  V4      p	V	'       d)   \        P                   ! RRP#                  V	4       24      hR	# u upi )
zWPopulate all current autogenerate comparison functions into
a given PriorityDispatcher.~:   NNc              3  X   <"   T F  qP                  SP                  4      x  K!  	  R # 5iN)matchr   ).0exclplugins   & r   	<genexpr>APlugin.populate_autogenerate_priority_dispatch.<locals>.<genexpr>l   s     ?wt::fkk**ws   '*TFz!setting up autogenerate plugin %szDid not locate plugins: z, N)set
startswithadd_make_rer   valuesanyr=   r   updater   r   populate_withr   
differencer	   CommandErrorjoin)clsr6   r7   excludeincludematched_expressionsr   inclinclude_matchesnever_matchedr@   s   &&&       @r   'populate_autogenerate_priority_dispatch.Plugin.populate_autogenerate_priority_dispatchY   sF    &)U+-(+#Ds##HT"X./ (	 $ #))+Fs?w?sss?w??? ")!(DM,?,?,L   ##**?;HH8&++F%%f&E&EF , G//0CD##*499]+C*DE  s   )F!3F!c               $    V ^8  d   QhRRRRRR/# )r   moduler   r   r   r$   r%   r   )r   s   "r   r   r      s!     # #j # # #r   c                :    VP                  \        V4      4       R# )a  Call the ``setup()`` function of a plugin module, identified by
passing the module object itself.

E.g.::

    from alembic.runtime.plugins import Plugin
    import myproject.alembic_plugin

    # Register the plugin manually
    Plugin.setup_plugin_from_module(
        myproject.alembic_plugin,
        "myproject.custom_operations"
    )

This will generate a new :class:`.Plugin` object with the given
name, which will register itself in the global list of plugins.
Then the module's ``setup()`` function is invoked, passing that
:class:`.Plugin` object.

This exact process is invoked automatically at import time for any
plugin module that is published via the ``alembic.plugins`` entrypoint.

N)setupr   )rN   rX   r   s   &&&r   setup_plugin_from_modulePlugin.setup_plugin_from_module   s    2 	VD\"r   )r   r   r<   )__name__
__module____qualname____firstlineno____doc__r    r'   r
   MEDIUMr3   classmethodrU   r[   __static_attributes__r   r   r   r   r      s_    =$
' #' &6%<%<' 'R $ $L # #r   r   c                    V ^8  d   QhRRRR/# )r   r   r   r$   zPattern[str]r   )r   s   "r   r   r      s     & &3 &< &r   c                
   V P                  R 4      pRpV FJ  pVR8X  d   VR,          pK  VP                  4       '       d   VRV,           ,          pK=  \        RV : 24      h	  \        P                  ! RVR,           R24      # )	. *z\..+?z\.zInvalid plugin expression ^:r   NN$)splitisidentifierr   recompile)r   tokensregtokens   &   r   rF   rF      s{    ZZ_F
CC<8OC!!55= C9$BCC  ::#b'!n%%r   c                   V ^8  d   QhRR/# r#   r   )r   s   "r   r   r      s     B B Br   c                     \         P                  ! R R7       F9  p V P                  4        F"  p\        P	                  WP
                  4       K$  	  K;  	  R# )zalembic.plugins)groupN)r   entry_pointsloadr   r[   r   )
entrypointmods     r   _setuprz      s<    ++2CD
??$C++CA % Er   )
__future__r   	importlibr   loggingrn   typesr   typingr   r   r   rh   r	   r
   r   r   r   	getLoggerr]   r   r   rF   rz   r   r   r   <module>r      sb    "   	       # %- !A# A#H& B r   