jenkins-bot submitted this change.

View Change


Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[doc] remove sphinx.ext.todo and use codeclimate instead

Change-Id: I80f8d5b8922bb2b21163f15b24fa6f99c39ba478
---
M .codeclimate.yml
M docs/conf.py
M scripts/checkimages.py
M scripts/coordinate_import.py
M pywikibot/page/_basepage.py
M pywikibot/page/_wikibase.py
M scripts/create_isbn_edition.py
M scripts/archivebot.py
8 files changed, 16 insertions(+), 41 deletions(-)

diff --git a/.codeclimate.yml b/.codeclimate.yml
index 141af70..1f2412a 100644
--- a/.codeclimate.yml
+++ b/.codeclimate.yml
@@ -46,6 +46,7 @@
exclude_patterns:
- "docs/"
- "!docs/conf.py"
+- "tox.ini"
- "*.json"
- "*.png"
- "*.rst"
diff --git a/docs/conf.py b/docs/conf.py
index e310fe8..f8edf4d 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -53,9 +53,7 @@
'sphinx.ext.autosectionlabel',
'sphinx.ext.autosummary',
'sphinx.ext.extlinks',
- # 'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
- 'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinxext.opengraph',
]
@@ -142,7 +140,7 @@
# keep_warnings = False

# If true, `todo` and `todoList` produce output, else they produce nothing.
-todo_include_todos = True
+# todo_include_todos = False


# -- Options for HTML output ----------------------------------------------
diff --git a/pywikibot/page/_basepage.py b/pywikibot/page/_basepage.py
index 7c62214..796eac5 100644
--- a/pywikibot/page/_basepage.py
+++ b/pywikibot/page/_basepage.py
@@ -1539,7 +1539,7 @@
"""
if hasattr(self, '_langlinks'):
return iter(self.langlinks(include_obsolete=include_obsolete))
- # XXX We might want to fill _langlinks when the Site
+ # FIXME: We might want to fill _langlinks when the Site
# method is called. If we do this, we'll have to think
# about what will happen if the generator is not completely
# iterated upon.
diff --git a/pywikibot/page/_wikibase.py b/pywikibot/page/_wikibase.py
index a5cf089..959c0b1 100644
--- a/pywikibot/page/_wikibase.py
+++ b/pywikibot/page/_wikibase.py
@@ -217,7 +217,7 @@
:raise NoWikibaseEntityError: if the entity doesn't exist
"""
if not hasattr(self, '_revid'):
- # fixme: unlike BasePage.latest_revision_id, this raises
+ # FIXME: unlike BasePage.latest_revision_id, this raises
# exception when entity is redirect, cannot use get_redirect
self.get()
return self._revid
@@ -275,7 +275,7 @@
value = cls.fromJSON(self._content.get(key, {}), self.repo)
setattr(self, key, value)
data[key] = value
- # xxx: need better handling for this
+ # fixme: need better handling for this
if key in ['claims', 'statements']:
value.set_on_item(self)

diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index 886494a..466707c 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -691,7 +691,7 @@
raise MalformedConfigError(e)

threads_per_archive[key].append((i, thread))
- whys.add(why) # xxx: we don't know if we ever archive anything
+ whys.add(why) # FIXME: we don't know if we ever archive anything

params = self.get_params(self.now, counter)
aux_params = self.get_params(self.now, counter + 1)
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index a5fb81a..5470cef 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -67,12 +67,6 @@
* Text= This is the template that the bot will use when it will report the
image's problem.

-.. todo::
- * Clean the code, some passages are pretty difficult to understand.
- * Add the "catch the language" function for commons.
- * Fix and reorganise the new documentation
- * Add a report for the image tagged.
-
.. versionchanged:: 8.4
Welcome messages are imported from :mod:`scripts.welcome` script.
"""
diff --git a/scripts/coordinate_import.py b/scripts/coordinate_import.py
index 21956a6..56df43c 100755
--- a/scripts/coordinate_import.py
+++ b/scripts/coordinate_import.py
@@ -174,7 +174,7 @@
if arg == '-create':
create_new = True

- # xxx: this preloading preloads neither coordinates nor Wikibase items
+ # FIXME: this preloading preloads neither coordinates nor Wikibase items
# but preloads wikitext which we don't need
generator = generator_factory.getCombinedGenerator(preload=True)

diff --git a/scripts/create_isbn_edition.py b/scripts/create_isbn_edition.py
index 291c0f0..82b924b 100755
--- a/scripts/create_isbn_edition.py
+++ b/scripts/create_isbn_edition.py
@@ -169,33 +169,6 @@
Possible important replication delay; wait 5 minutes before retry
-- otherwise risk for creating duplicates.

-**Known problems:**
- * Unknown ISBN, e.g. 9789400012820
- * No ISBN data available for an edition either causes no output
- (goob = Google Books), or an error message (wiki, openl)
- The script is taking care of both
- * Only 6 ISBN attributes are listed by the webservice(s)
- missing are e.g.: place of publication, number of pages
- * Not all ISBN atttributes have data (authos, publisher, date of
- publication, language)
- * The script uses multiple webservice calls (script might take time,
- but it is automated)
- * Need to amend ISBN items that have no author, publisher, or other
- required data (which additional services to use?)
- * How to add still more digital libraries?
- * Does the KBR has a public ISBN service (Koninklijke
- Bibliotheek van Belgiƫ)?
- * Filter for work properties -- need to amend Q47461344 (written
- work) instance and P629 (edition of) + P747 (has edition)
- statements https://www.wikidata.org/wiki/Q63413107
- ['9781282557246', '9786612557248', '9781847196057', '9781847196040']
- P8383: Goodreads-identificatiecode voor work 13957943 (should
- have P2969)
- P5331: OCLC-identificatiecode voor work 793965595 (should have P243)
-
-.. todo::
- * Add source reference (digital library instance)
-
**Algorithm:**
# Get parameters
# Validate parameters

To view, visit change 945900. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I80f8d5b8922bb2b21163f15b24fa6f99c39ba478
Gerrit-Change-Number: 945900
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: D3r1ck01 <dalangi-ctr@wikimedia.org>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged