Merlijn van Deen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/238011

Change subject: docs: only apply magic to scripts
......................................................................

docs: only apply magic to scripts

Change-Id: I651ccd9a621b59280923ab6c7f2fda4bd06708d7
---
M docs/conf.py
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/11/238011/1

diff --git a/docs/conf.py b/docs/conf.py
index 7d24345..917ff79 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -248,6 +248,11 @@
 def pywikibot_script_docstring_fixups(
         app, what, name, obj, options, lines):
     """Pywikibot specific conversions."""
+    if what != "module":
+        return
+
+    if os.path.sep + "scripts" + os.path.sep not in obj.__file__:
+        return
     for index, line in enumerate(lines):
         if line in ('&params;', '&pagegenerators_help;'):
             lines[index] = ('This script supports use of '

-- 
To view, visit https://gerrit.wikimedia.org/r/238011
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I651ccd9a621b59280923ab6c7f2fda4bd06708d7
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <valhall...@arctus.nl>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to