Skip to content

Commit 46ea808

Browse files
authored
Merge pull request #61 from Chilipp/fix-warnings
Fix warnings
2 parents a0120c0 + 5cf05b6 commit 46ea808

File tree

7 files changed

+22
-25
lines changed

7 files changed

+22
-25
lines changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ directives by adding in ``conf.py``:
128128
Disclaimer
129129
==========
130130
Copyright 2016-2019, Philipp S. Sommer
131+
131132
Copyright 2020-2021, Helmholtz-Zentrum Hereon
132133

133134
Licensed under the Apache License, Version 2.0 (the "License");

autodocsumm/__init__.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
**Disclaimer**
1111
1212
Copyright 2016-2019, Philipp S. Sommer
13+
1314
Copyright 2020-2021, Helmholtz-Zentrum Hereon
1415
1516
Licensed under the Apache License, Version 2.0 (the "License");
@@ -38,7 +39,7 @@
3839

3940
__status__ = "Production"
4041

41-
__version__ = '0.2.5'
42+
__version__ = '0.2.6'
4243

4344
from itertools import chain
4445

@@ -181,6 +182,10 @@ def get_grouped_documenters(self, all_members=False):
181182
self.real_modname = None or self.get_real_modname()
182183

183184
# try to also get a source code analyzer for attribute docs
185+
if sphinx_version < [4, 0]:
186+
record_dependencies = self.directive.filename_set
187+
else:
188+
record_dependencies = self.directive.record_dependencies
184189
try:
185190
self.analyzer = ModuleAnalyzer.for_module(self.real_modname)
186191
# parse right now, to get PycodeErrors on parsing (results will
@@ -192,9 +197,9 @@ def get_grouped_documenters(self, all_members=False):
192197
self.analyzer = None
193198
# at least add the module.__file__ as a dependency
194199
if hasattr(self.module, '__file__') and self.module.__file__:
195-
self.directive.filename_set.add(self.module.__file__)
200+
record_dependencies.add(self.module.__file__)
196201
else:
197-
self.directive.filename_set.add(self.analyzer.srcname)
202+
record_dependencies.add(self.analyzer.srcname)
198203

199204
self.env.temp_data['autodoc:module'] = self.modname
200205
if self.objpath:
@@ -487,9 +492,8 @@ def get_doc(self, *args, **kwargs):
487492
docstring = force_decode(docstring, encoding)
488493
doc.append(prepare_docstring(docstring, ignore))
489494
else:
490-
ignore = _get_arg("ignore", 0, 1, *args, **kwargs)
491495
for docstring in docstrings:
492-
doc.append(prepare_docstring(docstring, ignore))
496+
doc.append(prepare_docstring(docstring))
493497

494498
return doc
495499

docs/api/autodocsumm.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ API Reference
33

44
.. automodule:: autodocsumm
55
:members:
6-
:undoc-members:
76
:show-inheritance:
87

docs/conf.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969
add_module_names = False
7070

7171
# General information about the project.
72-
project = u'autodocsumm'
73-
copyright = u'2015, Philipp Sommer'
74-
author = u'Philipp Sommer'
72+
project = 'autodocsumm'
73+
copyright = '2016-2019, Philipp S. Sommer; 2020-2021, Helmholtz-Zentrum Hereon'
74+
author = 'Philipp S. Sommer'
7575

7676
# The version info for the project you're documenting, acts as replacement for
7777
# |version| and |release|, also used in various other places throughout the
@@ -137,11 +137,6 @@
137137
html_theme = 'sphinx_rtd_theme'
138138
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
139139

140-
# Add any paths that contain custom static files (such as style sheets) here,
141-
# relative to this directory. They are copied after the builtin static files,
142-
# so a file named "default.css" will overwrite the builtin "default.css".
143-
html_static_path = ['_static']
144-
145140
# otherwise, readthedocs.org uses their theme by default, so no need to specify
146141

147142
# Theme options are theme-specific and customize the look and feel of a theme
@@ -385,12 +380,9 @@
385380

386381
# Example configuration for intersphinx: refer to the Python standard library.
387382
intersphinx_mapping = {
388-
'sphinx': ('http://www.sphinx-doc.org/en/master/', None),
383+
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
384+
'python': ('https://docs.python.org/3.9/', None),
389385
}
390-
if six.PY3:
391-
intersphinx_mapping['python'] = ('https://docs.python.org/3.7/', None)
392-
else:
393-
intersphinx_mapping['python'] = ('https://docs.python.org/2.7/', None)
394386

395387

396388
def example_grouper(app, what, name, obj, section, parent):

docs/conf_settings.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ Directives
7171
use the same options as for the ``autoclass`` directive. You can select a
7272
specific section and omit the title via::
7373

74-
.. autoclasssumm:: MyClass
75-
:autosummary-sections: Methods
76-
:autosummary-no-titles:
74+
.. autoclasssumm:: MyClass
75+
:autosummary-sections: Methods
76+
:autosummary-no-titles:
7777

7878
By default, this directives also sets the `:members:` option unless you
7979
specify `:no-members`.

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ directives to generate a table at the top, e.g.:
127127

128128
.. code-block:: rst
129129
130-
.. automodule:: my.awesome.module
130+
.. automodule:: autodocsumm
131131
:autosummary:
132132
133133
Optionally, you can make autodocsumm active by default for all autodoc
@@ -144,6 +144,7 @@ directives by adding:
144144
Disclaimer
145145
==========
146146
Copyright 2016-2019, Philipp S. Sommer
147+
147148
Copyright 2020-2021, Helmholtz-Zentrum Hereon
148149

149150
Licensed under the Apache License, Version 2.0 (the "License");

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ def readme():
1111

1212

1313
setup(name='autodocsumm',
14-
version='0.2.5',
14+
version='0.2.6',
1515
description='Extended sphinx autodoc including automatic autosummaries',
1616
long_description=readme(),
1717
long_description_content_type='text/x-rst',
1818
classifiers=[
1919
'Development Status :: 5 - Production/Stable',
2020
'Intended Audience :: Developers',
2121
'Topic :: Documentation',
22-
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
22+
'License :: OSI Approved :: Apache Software License',
2323
'Programming Language :: Python :: 3',
2424
'Programming Language :: Python :: 3 :: Only',
2525
'Programming Language :: Python :: 3.5',

0 commit comments

Comments
 (0)