Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/238143
Change subject: flake8 ...................................................................... flake8 Change-Id: I00beee8787119b0c55e4e999469e8b1c8fe5d883 --- M pywikibase/claim.py M pywikibase/wbproperty.py M pywikibase/wbtime.py M pywikibase/wikibasepage.py M tests/test_itempage.py M tests/test_wikibasepage.py 6 files changed, 9 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/wikibase refs/changes/43/238143/1 diff --git a/pywikibase/claim.py b/pywikibase/claim.py index 1c77732..2758dd7 100644 --- a/pywikibase/claim.py +++ b/pywikibase/claim.py @@ -17,6 +17,7 @@ from pywikibase import Property import pywikibase.itempage + class Claim(Property): """ @@ -145,7 +146,6 @@ def __eq__(self, other): return other.toJSON() == self.toJSON() - def toJSON(self): """ diff --git a/pywikibase/wbproperty.py b/pywikibase/wbproperty.py index 15ed20b..f4363ab 100644 --- a/pywikibase/wbproperty.py +++ b/pywikibase/wbproperty.py @@ -33,7 +33,7 @@ it subclasses this Property class, but a claim does not have Page like behaviour and semantics. """ - from pywikibase.itempage import ItemPage # noqa + from pywikibase.itempage import ItemPage # noqa types = {'wikibase-item': ItemPage, 'string': basestring, 'commonsMedia': basestring, diff --git a/pywikibase/wbtime.py b/pywikibase/wbtime.py index 7f38ad8..6fa8de8 100644 --- a/pywikibase/wbtime.py +++ b/pywikibase/wbtime.py @@ -18,6 +18,7 @@ except NameError: long = int + class WbTime(object): """A Wikibase time representation.""" diff --git a/pywikibase/wikibasepage.py b/pywikibase/wikibasepage.py index 7b64ffc..e8acb47 100644 --- a/pywikibase/wikibasepage.py +++ b/pywikibase/wikibasepage.py @@ -25,7 +25,6 @@ def __eq__(self, other): return other.id == self.id - def get(self, content=None): """ Fetch all page data, and cache it. diff --git a/tests/test_itempage.py b/tests/test_itempage.py index ffd6147..6ea2d5b 100644 --- a/tests/test_itempage.py +++ b/tests/test_itempage.py @@ -1,5 +1,4 @@ import unittest -import codecs import json import os @@ -10,10 +9,12 @@ except NameError: basestring = str + class TestWikibasePage(unittest.TestCase): def setUp(self): - with open(os.path.join(os.path.split(__file__)[0], 'data', 'Q7251.wd')) as f: + with open(os.path.join(os.path.split(__file__)[0], + 'data', 'Q7251.wd')) as f: self._content = json.load(f)['entities']['Q7251'] self.item_page = ItemPage() self.item_page.get(content=self._content) diff --git a/tests/test_wikibasepage.py b/tests/test_wikibasepage.py index 8369556..df6281f 100644 --- a/tests/test_wikibasepage.py +++ b/tests/test_wikibasepage.py @@ -1,5 +1,4 @@ import unittest -import codecs import json import os @@ -10,10 +9,12 @@ except NameError: basestring = str + class TestWikibasePage(unittest.TestCase): def setUp(self): - with open(os.path.join(os.path.split(__file__)[0], 'data', 'Q7251.wd')) as f: + with open(os.path.join(os.path.split(__file__)[0], + 'data', 'Q7251.wd')) as f: self._content = json.load(f)['entities']['Q7251'] self.wb_page = WikibasePage() self.wb_page.get(content=self._content) -- To view, visit https://gerrit.wikimedia.org/r/238143 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00beee8787119b0c55e4e999469e8b1c8fe5d883 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/wikibase Gerrit-Branch: master Gerrit-Owner: Ladsgroup <ladsgr...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits