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
037fe9b7
Commit
037fe9b7
authored
Sep 17, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: pep8
parent
355e6fb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
doc/conf.py
doc/conf.py
+5
-3
doc/generate_rst.py
doc/generate_rst.py
+2
-3
No files found.
doc/conf.py
View file @
037fe9b7
...
...
@@ -11,11 +11,12 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import
sys
,
os
import
sys
import
os
os
.
system
(
'%s generate_rst.py generate'
%
sys
.
executable
)
sys
.
path
.
append
(
'.'
)
# for mysphinxext
sys
.
path
.
append
(
'.'
)
# for mysphinxext
if
not
os
.
path
.
exists
(
'changelog.rst'
)
and
os
.
path
.
exists
(
'../changelog.rst'
):
print
'Linking ../changelog.rst to changelog.rst'
...
...
@@ -228,10 +229,12 @@ for item in gevent.socket.__all__[:]:
from
sphinx.ext
import
autodoc
from
sphinx.ext.autodoc
import
ClassDocumenter
class
MyClassDocumenter
(
ClassDocumenter
):
def
get_object_members
(
self
,
want_all
):
members_check_module
,
members
=
super
(
MyClassDocumenter
,
self
).
get_object_members
(
want_all
)
def
key
((
name
,
obj
)):
try
:
return
obj
.
im_func
.
func_code
.
co_firstlineno
...
...
@@ -241,4 +244,3 @@ class MyClassDocumenter(ClassDocumenter):
return
members_check_module
,
members
autodoc
.
ClassDocumenter
=
MyClassDocumenter
doc/generate_rst.py
View file @
037fe9b7
...
...
@@ -29,6 +29,7 @@ modules = set(name for name in modules if not name.startswith('_'))
import
warnings
warnings
.
simplefilter
(
'ignore'
,
DeprecationWarning
)
def
generate_rst_for_module
(
module
,
do
=
True
):
rst_filename
=
'gevent.%s.rst'
%
module
exists
=
os
.
path
.
exists
(
rst_filename
)
...
...
@@ -53,7 +54,7 @@ def generate_rst_for_module(module, do=True):
result
=
template
%
params
if
exists
:
if
open
(
rst_filename
).
read
(
len
(
result
)
+
1
)
==
result
:
return
# already exists one which is the same
return
# already exists one which is the same
if
do
:
print
'Generated %s from %s'
%
(
rst_filename
,
m
.
__file__
)
open
(
rst_filename
,
'w'
).
write
(
result
)
...
...
@@ -93,5 +94,3 @@ if __name__ == '__main__':
generate_rst
(
do
=
False
)
else
:
sys
.
exit
(
'Invalid command line: %s'
%
(
sys
.
argv
[
1
:],
))
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