Skip to content

Commit aca7ed7

Browse files
committed
minor deprecation fixes
closes #60
1 parent d6f88f5 commit aca7ed7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

autodocsumm/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ def get_grouped_documenters(self, all_members=False):
181181
self.real_modname = None or self.get_real_modname()
182182

183183
# try to also get a source code analyzer for attribute docs
184+
if sphinx_version < [4, 0]:
185+
record_dependencies = self.directive.filename_set
186+
else:
187+
record_dependencies = self.directive.record_dependencies
184188
try:
185189
self.analyzer = ModuleAnalyzer.for_module(self.real_modname)
186190
# parse right now, to get PycodeErrors on parsing (results will
@@ -192,9 +196,9 @@ def get_grouped_documenters(self, all_members=False):
192196
self.analyzer = None
193197
# at least add the module.__file__ as a dependency
194198
if hasattr(self.module, '__file__') and self.module.__file__:
195-
self.directive.filename_set.add(self.module.__file__)
199+
record_dependencies.add(self.module.__file__)
196200
else:
197-
self.directive.filename_set.add(self.analyzer.srcname)
201+
record_dependencies.add(self.analyzer.srcname)
198202

199203
self.env.temp_data['autodoc:module'] = self.modname
200204
if self.objpath:
@@ -487,9 +491,8 @@ def get_doc(self, *args, **kwargs):
487491
docstring = force_decode(docstring, encoding)
488492
doc.append(prepare_docstring(docstring, ignore))
489493
else:
490-
ignore = _get_arg("ignore", 0, 1, *args, **kwargs)
491494
for docstring in docstrings:
492-
doc.append(prepare_docstring(docstring, ignore))
495+
doc.append(prepare_docstring(docstring))
493496

494497
return doc
495498

0 commit comments

Comments
 (0)