hyb
2026-01-09 4cb426cb3ae31e772a09d4ade5b2f0242aaeefa0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Ë
?ñúhZãóB—dZddlmZddlmZddlmZGd„de«Zy)zá
altgraph.ObjectGraph - Graph of objects with an identifier
==========================================================
 
A graph of objects that have a "graphident" attribute.
graphident is the key for the object in the graph
é)Ú
GraphError)ÚGraph)Ú filter_stackcóŽ—eZdZdZdd„Zd„Zdd„Zd„Zd„Zd„Z    d    „Z
d
„Z d „Z d „Z d „Zd„Zd„Zd„Zd„Zdd„Zd„Zd„Zd„Zd„Zy)Ú ObjectGraphzv
    A graph of objects that have a "graphident" attribute.
    graphident is the key for the object in the graph
    Ncóx—|€
t«}||_||_||_d|_|j |d«y©Nr)rÚ
graphidentÚgraphÚdebugÚindentÚadd_node)Úselfr r s   úGH:\Change_password\venv_build\Lib\site-packages\altgraph/ObjectGraph.pyÚ__init__zObjectGraph.__init__s8€Ø ˆ=Ü“GˆE؈ŒØˆŒ
؈Œ
؈Œ Ø ‰t˜TÕ"ócó4—dt|«j›dS)Nú<ú>)ÚtypeÚ__name__)rs rÚ__repr__zObjectGraph.__repr__sÜ˜d›×,Ó,Ð.Ð.rcóf—|€|}|j|«}|jj||¬«S)z–
        Iterate over the subgraph that is entirely reachable by condition
        starting from the given start node or the ObjectGraph root
        )ÚstartÚ    condition)Ú getRawIdentr Úiterdata)rrrs   rÚflattenzObjectGraph.flatten s8€ð
ˆ=؈EØ× Ñ  Ó'ˆØz‰z×"Ñ"¨¸)Ð"ÓDÐDrc#ó¤K—|jD]=}|jj|«}|€Œ!|jj|«–—Œ?y­w©N)r Ú    node_data)rÚidentÚnodes   rÚnodeszObjectGraph.nodes*sHèø€Ø—Z‘Zò    2ˆEØ—:‘:×'Ñ'¨Ó.ˆDØÑØ—j‘j×*Ñ*¨5Ó1Ó1ñ    2ùs
‚-A° Ac󜇗|€‰}‰j|«}‰jj|«\}}}}ˆfd„}||d«||d«fS)Nc3óž•K—t«}ˆfd„|D«D]0}||}||vsŒ ‰j|«–—|j|«Œ2y­w)Nc3óT•K—|]}‰jj|«–—Œ!y­wr )r Ú describe_edge)Ú.0Úers  €rú    <genexpr>z<ObjectGraph.get_edges.<locals>.iter_edges.<locals>.<genexpr>8s øèø€ÒA¸˜Ÿ
™
×0Ñ0°×3ÑAùsƒ%()ÚsetÚfindNodeÚadd)ÚlstÚnÚseenÚtplr"rs     €rÚ
iter_edgesz)ObjectGraph.get_edges.<locals>.iter_edges6sMøèø€Ü“5ˆDÛA¸SÔAò $Ø˜A™Ø Ò$ØŸ-™-¨Ó.Ò.Ø—H‘H˜U•Oñ     $ùs
ƒ"A ¦'A éé)rr Ú describe_node)rr#rÚ_ÚoutrawÚincrawr3s`      rÚ    get_edgeszObjectGraph.get_edges0sZø€Ø ˆ<؈DØ× Ñ  Ó&ˆØ#Ÿz™z×7Ñ7¸Ó>шˆ1ˆffô    $ñ˜& !Ó$¡j°¸Ó&;Ð;Ð;rcó¼—|€|}|j|«}|j|«}|jj||«}|jj|«Sr )rr Ú edge_by_nodeÚ    edge_data)rÚfromNodeÚtoNoderÚstopÚedges      rÚedgeDatazObjectGraph.edgeData@sX€Ø Р؈HØ× Ñ  Ó*ˆØ×Ñ Ó'ˆØz‰z×&Ñ& u¨dÓ3ˆØz‰z×#Ñ# DÓ)Ð)rcóÀ—|€|}|j|«}|j|«}|jj||«}|jj||«yr )rr r<Úupdate_edge_data)rr>r?rBrr@rAs       rÚupdateEdgeDatazObjectGraph.updateEdgeDataHsW€Ø Р؈HØ× Ñ  Ó*ˆØ×Ñ Ó'ˆØz‰z×&Ñ& u¨dÓ3ˆØ 
‰
×#Ñ# D¨(Õ3rcó—t|j||«\}}}|D]#\}}|jj||d¬«Œ%|D]}|jj|«Œt    |«dz
t    |«t    |«fS)zþ
        Filter the ObjectGraph in-place by removing all edges to nodes that
        do not match every filter in the given filter list
 
        Returns a tuple containing the number of:
            (nodes_visited, nodes_removed, nodes_orphaned)
        Úorphan©r=é)rr Úadd_edgeÚ    hide_nodeÚlen)rÚfiltersÚvisitedÚremovesÚorphansÚ    last_goodÚtailr#s        rÚ filterStackzObjectGraph.filterStackPsŽ€ô%1°·±¸TÀ7Ó$KÑ!ˆ˜'à&ò    E‰OˆItØ J‰J× Ñ      ¨4¸8Ð Õ Dð    Eðò    'ˆDØ J‰J×  Ñ   Õ &ð    'ô7‹|˜aѤ W£¬s°7«|Ð;Ð;rcób—|j|«}||jj|«yy)zC
        Remove the given node from the graph if it exists
        N)ÚgetIdentr rK©rr#r"s   rÚ
removeNodezObjectGraph.removeNodebs/€ð— ‘ ˜dÓ#ˆØ Ð Ø J‰J×  Ñ   Õ 'ð rcóҗ|€|}|j|«}|j|«}|?|<    |jj||«}|€y|jj|«Œ;yy)z:
        Remove all edges from fromnode to tonode
        N)rUr r<Ú    hide_edge)rÚfromnodeÚtonodeÚ    fromidentÚtoidentrAs      rÚremoveReferencezObjectGraph.removeReferencejsv€ð Р؈HØ—M‘M (Ó+ˆ    Ø—-‘- Ó'ˆØ Ð   WÐ%8ØØ—z‘z×.Ñ.¨y¸'ÓBØ<ØØ—
‘
×$Ñ$ TÔ*ð    ð&9Ð  rcól—|j|«}||S|j|«}|€y|jS)z5
        Get the graph identifier for a node
        N)rr-r
rVs   rrUzObjectGraph.getIdentys?€ð× Ñ  Ó&ˆØ Р؈L؏}‰}˜TÓ"ˆØ ˆ<ØØ‰Ðrcó,—||ur|St|dd«}|S)z6
        Get the identifier for a node object
        r
N)ÚgetattrrVs   rrzObjectGraph.getRawIdent…s#€ð 4‰<؈Kܘ˜l¨DÓ1ˆØˆ rcó(—|j|«duSr )r-©rr#s  rÚ __contains__zObjectGraph.__contains__Žs€Ø}‰}˜TÓ"¨$Ð.Ð.rcó‚—|j|«}|€|}    |jj|«S#t$rYywxYw)z,
        Find the node on the graph
        N)rr r!ÚKeyErrorrVs   rr-zObjectGraph.findNode‘sJ€ð× Ñ  Ó&ˆØ ˆ=؈Eð    Ø—:‘:×'Ñ'¨Ó.Ð .øÜò    Ùð    ús —2²    >½>cóà—|jdd|«    |jj|j«y#t$r)|jj |j|«YywxYw)z@
        Add a node to the graph referenced by the root
        éÚaddNodeN)Úmsgr Ú restore_noder
rrrcs  rrizObjectGraph.addNodesV€ð     ‰I˜tÔ$ð    7Ø J‰J× #Ñ # D§O¡OÕ 4øÜò    7Ø J‰J× Ñ  §¡°Ö 6ð    7ús•%;»/A-Á,A-cóÀ—|€|}|j|«|j|«}}||€y|jdd|||«|jj|||¬«y)z<
        Create a reference from fromnode to tonode
        NrhÚcreateReferencerH)rUrjr rJ)rrZr[r=r\r]s      rrmzObjectGraph.createReference¨se€ð Р؈HØ!Ÿ]™]¨8Ó4°d·m±mÀFÓ6K7ˆ    Ø Ð   Ø Ø ‰Ð% x°¸ÔCØ 
‰
×јI w¸)ÐÕDrcóf—|j|«}|€||g|¢­i|¤Ž}|j|«|S)zl
        Add a node of type cls to the graph if it does not already exist
        by the given name
        )r-ri)rÚclsÚnameÚargsÚkwÚms      rÚ
createNodezObjectGraph.createNode´s;€ð
M‰M˜$Ó ˆØ ˆ9ِDÐ&˜4Ò& 2Ñ&ˆAØ L‰L˜ŒO؈rc ó¢—|rM||jkr=td|jz›|›ddjt    t
|««›«yyy)z<
        Print a debug message with the given level
        z  ú N)r Úprintr ÚjoinÚmapÚrepr©rÚlevelÚsrqs    rrjzObjectGraph.msg¿s@€ñ ˜$Ÿ*™*Ò$Ü ˜t d§k¡kÒ1²1°c·h±h¼sÄ4È»Ô6OÐPÕ Qð%ˆ1rcót—||jkr)|j||g|¢­Ž|jdz|_yy)z2
        Print a debug message and indent
        rIN)r rjr r{s    rÚmsginzObjectGraph.msginÆs9€ð D—J‘JÒ Ø ˆDH‰HU˜AÐ % Ó %ØŸ+™+¨™/ˆDKð rcót—||jkr)|jdz
|_|j||g|¢­Žyy)z2
        Dedent and print a debug message
        rIN)r r rjr{s    rÚmsgoutzObjectGraph.msgoutÎs9€ð D—J‘JÒ ØŸ+™+¨™/ˆDŒKØ ˆDH‰HU˜AÐ % Ô %ð rr    )NNr )rÚ
__module__Ú __qualname__Ú__doc__rrrr$r:rBrErSrWr^rUrrdr-rirmrtrjrr©rrrrsn„ñó
#ò/óEò2ò <ò *ò4ò<ò$(ò +ò
òò/ò
ò    7ó
Eò    òRò*ó&rrN)    r„ÚaltgraphrÚaltgraph.GraphrÚaltgraph.GraphUtilrÚobjectrr…rrú<module>rŠs#ðñõ Ý Ý+ôF&&õF&r