Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
cda8ebbf
Commit
cda8ebbf
authored
Nov 15, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mysphinxext.py: control noisiness level via variable
parent
2036caa0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
doc/mysphinxext.py
doc/mysphinxext.py
+8
-6
No files found.
doc/mysphinxext.py
View file @
cda8ebbf
...
...
@@ -2,7 +2,7 @@ from sphinx.ext.autodoc import cut_lines
from
sphinx.ext
import
intersphinx
from
docutils
import
nodes
noisy
=
False
noisy
=
0
message_cache
=
set
()
def
missing_reference
(
app
,
env
,
node
,
contnode
):
...
...
@@ -31,18 +31,20 @@ def missing_reference(app, env, node, contnode):
newnode
[
'class'
]
=
'external-xref'
newnode
.
append
(
contnode
)
msg
=
'Resolved missing-reference: :%5s:`%s` -> %s'
%
(
type
,
target
,
refuri
)
if
msg
not
in
message_cache
:
if
noisy
>=
1
or
msg
not
in
message_cache
:
print
msg
message_cache
.
add
(
msg
)
return
newnode
#print [type, target, modname, classname]
if
noisy
>=
1
:
print
'Looking for %s'
%
[
type
,
target
,
modname
,
classname
]
print
node
for
docname
,
items
in
env
.
indexentries
.
iteritems
():
if
noisy
:
if
noisy
>=
2
:
print
docname
for
(
i_type
,
i_string
,
i_target
,
i_aliasname
)
in
items
:
if
noisy
:
if
noisy
>=
3
:
print
'---'
,
[
i_type
,
i_string
,
i_target
,
i_aliasname
]
if
i_aliasname
.
endswith
(
target
):
stripped_aliasname
=
i_aliasname
[
len
(
docname
):]
...
...
@@ -50,7 +52,7 @@ def missing_reference(app, env, node, contnode):
assert
stripped_aliasname
[
0
]
==
'.'
,
repr
(
stripped_aliasname
)
stripped_aliasname
=
stripped_aliasname
[
1
:]
if
stripped_aliasname
==
target
:
if
noisy
:
if
noisy
>=
1
:
print
'--- found %s %s in %s'
%
(
type
,
target
,
i_aliasname
)
return
new_reference
(
docname
+
'.html#'
+
i_aliasname
,
i_aliasname
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment