We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3077910 commit 16d1fa9Copy full SHA for 16d1fa9
docs/source/conf.py
@@ -58,6 +58,17 @@
58
napoleon_google_docstring = True
59
smartquotes = False
60
61
+# Clean up automodapi generated files in source after build to make sure we get a full rebuild next time
62
+def cleanup_automodapi_files(app, exception):
63
+ """Remove automodapi generated files from source directory after build."""
64
+ import shutil
65
+ api_dir = os.path.join(app.srcdir, 'api')
66
+ if os.path.exists(api_dir):
67
+ shutil.rmtree(api_dir)
68
+
69
+def setup(app):
70
+ app.connect('build-finished', cleanup_automodapi_files)
71
72
# Add any paths that contain templates here, relative to this directory.
73
templates_path = ['_templates']
74
0 commit comments