3
T'íc:5 ã @ s$ d Z ddlZddlZddlZddlmZ ddlmZmZm Z m
Z
mZmZm
Z
mZ ddlmZ ddlmZmZ ddlZddlmZ ddlmZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
l m!Z!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z(m)Z)m*Z* ddl+m,Z, e)j-e.Z/dZ0G dd deZ1ee2e2ee2 dddZ3ee4dddZ5eeddddZ6eee
e2 edddd Z7eee2dd!d"d#Z8G d$d% d%e&Z9eeeeee d&d'd(Z:ee2ee2 d)d*d+Z;ee2e4d)d,d-Z<ee e
e2ee2ef e2f ddf d.d/d0Z=eee2ef d.d1d2Z>dS )3z7Add links to module code in Python object descriptions.é N)Úpath)ÚAnyÚDictÚ GeneratorÚIterableÚOptionalÚSetÚTupleÚcast)Únodes)ÚElementÚNode)Úaddnodes)ÚSphinx)ÚBuilder)ÚStandaloneHTMLBuilder)ÚRemovedInSphinx50Warning)ÚBuildEnvironment)Ú_Ú__)ÚModuleAnalyzer)ÚSphinxPostTransform)Úget_full_modnameÚloggingÚstatus_iterator)Úmake_refnodeZ_modulesc @ s e Zd ZdZdS )Úviewcode_anchorzÞNode for viewcode anchors.
This node will be processed in the resolving phase.
For viewcode supported builders, they will be all converted to the anchors.
For not supported builders, they will be removed.
N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r! r! ú5/tmp/pip-build-gk9425m9/sphinx/sphinx/ext/viewcode.pyr s r )ÚappÚmodnameÚ attributeÚreturnc C sp y
t ||S tk
r, tjd|| d S tk
rj } z$tjtj j tjd|| d S d }~X nX d S )NzDidn't find %s in %sz0viewcode can't import %s, failed with error "%s")r ÚAttributeErrorÚloggerÚverboseÚ ExceptionÚ tracebackÚ
format_excÚrstrip)r# r$ r% Úer! r! r"