mirror of
https://github.com/davidhalter/jedi.git
synced 2026-11-25 18:48:09 +08:00
exclude deprecated members from documentation (there are just too many), this can be undone once we've removed the old API (also cleaned up docs/conf.py a little bit). fixes #317
This commit is contained in:
1 parent
17ecd73df9
commit
b7a4b543fd
1 file changed
+16
-1
+16
-1
@@ -11,7 +11,9 @@
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os, datetime
|
||||
import sys
|
||||
import os
|
||||
import datetime
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
@@ -276,3 +278,16 @@ autodoc_default_flags = []
|
||||
intersphinx_mapping = {
|
||||
'http://docs.python.org/': None,
|
||||
}
|
||||
|
||||
|
||||
def skip_deprecated(app, what, name, obj, skip, options):
|
||||
"""
|
||||
All attributes containing a deprecated note shouldn't be documented
|
||||
anymore. This makes it even clearer that they are not supported anymore.
|
||||
"""
|
||||
doc = obj.__doc__
|
||||
return skip or doc and '.. deprecated::' in doc
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.connect('autodoc-skip-member', skip_deprecated)
|
||||
Reference in new issue
Block a user