Jean-Frédéric has uploaded a new change for review. https://gerrit.wikimedia.org/r/323692
Change subject: Fix Flake8 violation E305 and pin flake8 dependency ...................................................................... Fix Flake8 violation E305 and pin flake8 dependency Latest flake8 upgrade (3.2.1) included a pydocstyle upgrade which modified the behaviour of violation E305, 'expected 2 blank lines after class or function definition, found 1' This fixes the violations and pins flake8 to the current version. Change-Id: Icd96413e4c1fe6efc6c78936b5a9908dcf2cbddf --- M erfgoedbot/add_object_location_monuments.py M erfgoedbot/categorize_images.py M erfgoedbot/database_statistics.py M erfgoedbot/monument_tables.py M erfgoedbot/top_streets.py M erfgoedbot/update_id_dump.py M tox.ini 7 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage refs/changes/92/323692/1 diff --git a/erfgoedbot/add_object_location_monuments.py b/erfgoedbot/add_object_location_monuments.py index 99c790b..b61d421 100644 --- a/erfgoedbot/add_object_location_monuments.py +++ b/erfgoedbot/add_object_location_monuments.py @@ -234,6 +234,7 @@ locateCountry( countrycode, lang, countryconfig, conn, cursor, conn2, cursor2) + if __name__ == "__main__": try: main() diff --git a/erfgoedbot/categorize_images.py b/erfgoedbot/categorize_images.py index 8700c68..486ea17 100644 --- a/erfgoedbot/categorize_images.py +++ b/erfgoedbot/categorize_images.py @@ -533,5 +533,6 @@ outputStatistics(statistics) + if __name__ == "__main__": main() diff --git a/erfgoedbot/database_statistics.py b/erfgoedbot/database_statistics.py index 5b65931..323cf8e 100755 --- a/erfgoedbot/database_statistics.py +++ b/erfgoedbot/database_statistics.py @@ -344,5 +344,6 @@ outputStatistics(statistics) + if __name__ == "__main__": main() diff --git a/erfgoedbot/monument_tables.py b/erfgoedbot/monument_tables.py index 693dd12..383064f 100755 --- a/erfgoedbot/monument_tables.py +++ b/erfgoedbot/monument_tables.py @@ -79,6 +79,7 @@ for (countrycode, lang), countryconfig in mconfig.countries.iteritems(): processCountry(countrycode, lang, countryconfig) + if __name__ == "__main__": try: main() diff --git a/erfgoedbot/top_streets.py b/erfgoedbot/top_streets.py index 815f454..c9d9452 100644 --- a/erfgoedbot/top_streets.py +++ b/erfgoedbot/top_streets.py @@ -105,6 +105,7 @@ else: print u'Usage' + if __name__ == "__main__": try: main() diff --git a/erfgoedbot/update_id_dump.py b/erfgoedbot/update_id_dump.py index e77ba2b..f6f16f5 100755 --- a/erfgoedbot/update_id_dump.py +++ b/erfgoedbot/update_id_dump.py @@ -148,6 +148,7 @@ u'Working on countrycode "%s" in language "%s"' % (countrycode, lang)) processCountry(countrycode, lang, countryconfig, conn, cursor) + if __name__ == "__main__": try: main() diff --git a/tox.ini b/tox.ini index 9a1e648..e682acd 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ commands = nosetests {posargs} [testenv:flake8] -deps = flake8 +deps = flake8==3.2.1 commands = flake8 [testenv:yaml] -- To view, visit https://gerrit.wikimedia.org/r/323692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd96413e4c1fe6efc6c78936b5a9908dcf2cbddf Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/heritage Gerrit-Branch: master Gerrit-Owner: Jean-Frédéric <jeanfrederic.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits