From 53a74f1c1567b28e6e23bb1ab48ca3a0f888d307 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Tue, 10 May 2022 10:51:08 +0300 Subject: Fix up some Python2-isms using pyupgrade --- tests/messages/test_catalog.py | 1 - tests/messages/test_checkers.py | 1 - tests/messages/test_extract.py | 1 - tests/messages/test_frontend.py | 9 ++++----- tests/messages/test_js_extract.py | 1 - tests/messages/test_jslexer.py | 2 -- tests/messages/test_mofile.py | 1 - tests/messages/test_plurals.py | 1 - tests/messages/test_pofile.py | 1 - tests/test_core.py | 1 - tests/test_date_intervals.py | 3 --- tests/test_dates.py | 1 - tests/test_day_periods.py | 1 - tests/test_languages.py | 1 - tests/test_lists.py | 1 - tests/test_localedata.py | 1 - tests/test_numbers.py | 1 - tests/test_plural.py | 1 - tests/test_smoke.py | 1 - tests/test_support.py | 1 - tests/test_util.py | 1 - 21 files changed, 4 insertions(+), 28 deletions(-) (limited to 'tests') diff --git a/tests/messages/test_catalog.py b/tests/messages/test_catalog.py index 830cabf..f320236 100644 --- a/tests/messages/test_catalog.py +++ b/tests/messages/test_catalog.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. diff --git a/tests/messages/test_checkers.py b/tests/messages/test_checkers.py index b709d4b..2ae5946 100644 --- a/tests/messages/test_checkers.py +++ b/tests/messages/test_checkers.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. diff --git a/tests/messages/test_extract.py b/tests/messages/test_extract.py index fb9599d..3ed71de 100644 --- a/tests/messages/test_extract.py +++ b/tests/messages/test_extract.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. diff --git a/tests/messages/test_frontend.py b/tests/messages/test_frontend.py index 4ed30ec..bacb0e2 100644 --- a/tests/messages/test_frontend.py +++ b/tests/messages/test_frontend.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. @@ -1194,7 +1193,7 @@ compiling catalog %s to %s '-o', po_file, '-i', tmpl_file ]) - with open(po_file, "r") as infp: + with open(po_file) as infp: catalog = read_po(infp) assert len(catalog) == 3 @@ -1210,7 +1209,7 @@ compiling catalog %s to %s '-o', po_file, '-i', tmpl_file]) - with open(po_file, "r") as infp: + with open(po_file) as infp: catalog = read_po(infp) assert len(catalog) == 4 # Catalog was updated @@ -1288,7 +1287,7 @@ compiling catalog %s to %s '-o', po_file, '-i', tmpl_file]) - with open(po_file, "r") as infp: + with open(po_file) as infp: catalog = read_po(infp) assert len(catalog) == 3 @@ -1305,7 +1304,7 @@ compiling catalog %s to %s '-o', po_file, '-i', tmpl_file]) - with open(po_file, "r") as infp: + with open(po_file) as infp: catalog = read_po(infp) assert len(catalog) == 4 # Catalog was updated diff --git a/tests/messages/test_js_extract.py b/tests/messages/test_js_extract.py index 73b16a9..72c5211 100644 --- a/tests/messages/test_js_extract.py +++ b/tests/messages/test_js_extract.py @@ -1,4 +1,3 @@ -# -- encoding: UTF-8 -- from io import BytesIO import pytest from babel.messages import extract diff --git a/tests/messages/test_jslexer.py b/tests/messages/test_jslexer.py index b70621f..35204ee 100644 --- a/tests/messages/test_jslexer.py +++ b/tests/messages/test_jslexer.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - from babel.messages import jslexer diff --git a/tests/messages/test_mofile.py b/tests/messages/test_mofile.py index 93f3689..bf6ef5e 100644 --- a/tests/messages/test_mofile.py +++ b/tests/messages/test_mofile.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. diff --git a/tests/messages/test_plurals.py b/tests/messages/test_plurals.py index 0d20541..df17fd8 100644 --- a/tests/messages/test_plurals.py +++ b/tests/messages/test_plurals.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. diff --git a/tests/messages/test_pofile.py b/tests/messages/test_pofile.py index b154c09..632efe7 100644 --- a/tests/messages/test_pofile.py +++ b/tests/messages/test_pofile.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. diff --git a/tests/test_core.py b/tests/test_core.py index 53578f8..529a424 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. diff --git a/tests/test_date_intervals.py b/tests/test_date_intervals.py index 4f42170..dc3ae34 100644 --- a/tests/test_date_intervals.py +++ b/tests/test_date_intervals.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import datetime from babel import dates diff --git a/tests/test_dates.py b/tests/test_dates.py index 9367466..6a24ed4 100644 --- a/tests/test_dates.py +++ b/tests/test_dates.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. diff --git a/tests/test_day_periods.py b/tests/test_day_periods.py index 52cbc5e..414c0f6 100644 --- a/tests/test_day_periods.py +++ b/tests/test_day_periods.py @@ -1,4 +1,3 @@ -# -- encoding: UTF-8 -- from datetime import time import babel.dates as dates diff --git a/tests/test_languages.py b/tests/test_languages.py index 32f0d67..41fcc9e 100644 --- a/tests/test_languages.py +++ b/tests/test_languages.py @@ -1,4 +1,3 @@ -# -- encoding: UTF-8 -- from babel.languages import get_official_languages, get_territory_language_info diff --git a/tests/test_lists.py b/tests/test_lists.py index e843a63..e51f18b 100644 --- a/tests/test_lists.py +++ b/tests/test_lists.py @@ -1,4 +1,3 @@ -# coding=utf-8 import pytest from babel import lists diff --git a/tests/test_localedata.py b/tests/test_localedata.py index e93309b..8c4e40e 100644 --- a/tests/test_localedata.py +++ b/tests/test_localedata.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. diff --git a/tests/test_numbers.py b/tests/test_numbers.py index 3fab394..bac6c61 100644 --- a/tests/test_numbers.py +++ b/tests/test_numbers.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. diff --git a/tests/test_plural.py b/tests/test_plural.py index b0230c7..4210033 100644 --- a/tests/test_plural.py +++ b/tests/test_plural.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. diff --git a/tests/test_smoke.py b/tests/test_smoke.py index 052c1cb..aed676a 100644 --- a/tests/test_smoke.py +++ b/tests/test_smoke.py @@ -1,4 +1,3 @@ -# -- encoding: UTF-8 -- """ These tests do not verify any results and should not be run when looking at improving test coverage. They just verify that basic diff --git a/tests/test_support.py b/tests/test_support.py index 6e4c44b..a4fa326 100644 --- a/tests/test_support.py +++ b/tests/test_support.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. diff --git a/tests/test_util.py b/tests/test_util.py index 43076ad..e6a19d5 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software, 2013-2022 the Babel team # All rights reserved. -- cgit v1.2.1