diff --git a/.github/workflows/commit-ofxtools.yml b/.github/workflows/commit-ofxtools.yml index e32ab22..2159c8f 100644 --- a/.github/workflows/commit-ofxtools.yml +++ b/.github/workflows/commit-ofxtools.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v3 diff --git a/ofxtools/models/profile.py b/ofxtools/models/profile.py index 420d99a..7100020 100644 --- a/ofxtools/models/profile.py +++ b/ofxtools/models/profile.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" FI Profile - OFX Section 7 """ +"""FI Profile - OFX Section 7""" __all__ = [ diff --git a/ofxtools/ofxhome.py b/ofxtools/ofxhome.py index f968a58..f769a7f 100644 --- a/ofxtools/ofxhome.py +++ b/ofxtools/ofxhome.py @@ -21,6 +21,7 @@ import xml.etree.ElementTree as ET from xml.sax import saxutils import urllib +import urllib.request import urllib.error as urllib_error import urllib.parse as urllib_parse import re diff --git a/ofxtools/scripts/ofxget.py b/ofxtools/scripts/ofxget.py index 82adcce..b886b9c 100644 --- a/ofxtools/scripts/ofxget.py +++ b/ofxtools/scripts/ofxget.py @@ -1335,7 +1335,7 @@ def _read_scan_response( def collate_scan_results( - scan_results: Iterable[Tuple[OFXVersion, Sequence[MarkupFormat]]] + scan_results: Iterable[Tuple[OFXVersion, Sequence[MarkupFormat]]], ) -> ScanResult: """ Input ``scan_results`` needs to be a complete set for either OFXv1 or v2, @@ -1365,7 +1365,7 @@ def sortKey(d): # OFX PARSING ############################################################################### def verify_status( - trnrs: Union[models.SONRS, models.PROFTRNRS, models.ACCTINFOTRNRS] + trnrs: Union[models.SONRS, models.PROFTRNRS, models.ACCTINFOTRNRS], ) -> None: """ Input a models.Aggregate instance representing a transaction wrapper. @@ -1499,7 +1499,7 @@ def fi_index() -> Sequence[Tuple[str, str, str]]: names = {id_: name for id_, name in USERCFG["NAMES"].items()} cfg_default_sect = USERCFG.default_section # type: ignore servers = [ - (names.get(sct.get("ofxhome", None), ""), nick, sct.get("ofxhome", "--")) + (names.get(sct.get("ofxhome", ""), ""), nick, sct.get("ofxhome", "--")) for nick, sct in USERCFG.items() if nick not in (cfg_default_sect, "NAMES") and "url" in sct ] diff --git a/ofxtools/utils.py b/ofxtools/utils.py index 9771ce6..0d052f2 100644 --- a/ofxtools/utils.py +++ b/ofxtools/utils.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Utility functions and classes """ +"""Utility functions and classes""" # stdlib imports import datetime diff --git a/setup.py b/setup.py index 98f94ec..3599725 100644 --- a/setup.py +++ b/setup.py @@ -65,6 +65,9 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ], keywords=["ofx", "Open Financial Exchange"], ) diff --git a/tests/base.py b/tests/base.py index 2eb6c43..9977b80 100644 --- a/tests/base.py +++ b/tests/base.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Common classes reused by unit tests in this package """ +"""Common classes reused by unit tests in this package""" # stdlib imports import unittest diff --git a/tests/test_client.py b/tests/test_client.py index 54f17f3..c950c0b 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for ofxtools.Client """ +"""Unit tests for ofxtools.Client""" # stdlib imports import unittest diff --git a/tests/test_header.py b/tests/test_header.py index a1dfce6..7713231 100644 --- a/tests/test_header.py +++ b/tests/test_header.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for ofxtools.header """ +"""Unit tests for ofxtools.header""" # stdlib imports import unittest diff --git a/tests/test_models_base.py b/tests/test_models_base.py index 81a178a..f05e047 100644 --- a/tests/test_models_base.py +++ b/tests/test_models_base.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models/base.py """ +"""Unit tests for models/base.py""" # stdlib imports import unittest import xml.etree.ElementTree as ET diff --git a/tests/test_models_billpay_common.py b/tests/test_models_billpay_common.py index 493546b..715afc9 100644 --- a/tests/test_models_billpay_common.py +++ b/tests/test_models_billpay_common.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.billpay.common """ +"""Unit tests for models.billpay.common""" # stdlib imports import unittest from datetime import datetime diff --git a/tests/test_models_billpay_list.py b/tests/test_models_billpay_list.py index 6a94bb4..c7e664f 100644 --- a/tests/test_models_billpay_list.py +++ b/tests/test_models_billpay_list.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.billpay.common """ +"""Unit tests for models.billpay.common""" # stdlib imports import unittest from xml.etree.ElementTree import Element, SubElement diff --git a/tests/test_models_billpay_mail.py b/tests/test_models_billpay_mail.py index 37de9c6..8ccdbda 100644 --- a/tests/test_models_billpay_mail.py +++ b/tests/test_models_billpay_mail.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.billpay.mail""" +"""Unit tests for models.billpay.mail""" # stdlib imports import unittest import xml.etree.ElementTree as ET diff --git a/tests/test_models_billpay_pmt.py b/tests/test_models_billpay_pmt.py index 4563a6f..bae68c2 100644 --- a/tests/test_models_billpay_pmt.py +++ b/tests/test_models_billpay_pmt.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.billpay.pmt """ +"""Unit tests for models.billpay.pmt""" # stdlib imports import unittest from xml.etree.ElementTree import Element, SubElement diff --git a/tests/test_models_billpay_recur.py b/tests/test_models_billpay_recur.py index 72266f8..b7d8c31 100644 --- a/tests/test_models_billpay_recur.py +++ b/tests/test_models_billpay_recur.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.billpay.recur """ +"""Unit tests for models.billpay.recur""" # stdlib imports import unittest from decimal import Decimal diff --git a/tests/test_models_billpay_sync.py b/tests/test_models_billpay_sync.py index adf5007..d8716a4 100644 --- a/tests/test_models_billpay_sync.py +++ b/tests/test_models_billpay_sync.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.billpay.sync """ +"""Unit tests for models.billpay.sync""" # stdlib imports import unittest import xml.etree.ElementTree as ET diff --git a/tests/test_models_common.py b/tests/test_models_common.py index 125da2f..ed91a71 100644 --- a/tests/test_models_common.py +++ b/tests/test_models_common.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.common """ +"""Unit tests for models.common""" # stdlib imports import unittest from datetime import datetime diff --git a/tests/test_models_email.py b/tests/test_models_email.py index 1ad6c3b..8da458c 100644 --- a/tests/test_models_email.py +++ b/tests/test_models_email.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.email """ +"""Unit tests for models.email""" # stdlib imports import unittest from xml.etree.ElementTree import Element, SubElement diff --git a/tests/test_models_i18n.py b/tests/test_models_i18n.py index b4a3bc8..8d99489 100644 --- a/tests/test_models_i18n.py +++ b/tests/test_models_i18n.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models/common.py """ +"""Unit tests for models/common.py""" # stdlib imports import unittest from decimal import Decimal diff --git a/tests/test_models_invest.py b/tests/test_models_invest.py index de4eca6..5bb62b6 100644 --- a/tests/test_models_invest.py +++ b/tests/test_models_invest.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.invest """ +"""Unit tests for models.invest""" # stdlib imports import unittest from xml.etree.ElementTree import Element, SubElement diff --git a/tests/test_models_invest_oo.py b/tests/test_models_invest_oo.py index 65b5974..9966492 100644 --- a/tests/test_models_invest_oo.py +++ b/tests/test_models_invest_oo.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.invest """ +"""Unit tests for models.invest""" # stdlib imports import unittest from xml.etree.ElementTree import Element, SubElement diff --git a/tests/test_models_invest_transactions.py b/tests/test_models_invest_transactions.py index 0baa42f..599fe33 100644 --- a/tests/test_models_invest_transactions.py +++ b/tests/test_models_invest_transactions.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.invest """ +"""Unit tests for models.invest""" # stdlib imports import unittest from xml.etree.ElementTree import Element, SubElement diff --git a/tests/test_models_ofx.py b/tests/test_models_ofx.py index 4bdff6b..e63691c 100644 --- a/tests/test_models_ofx.py +++ b/tests/test_models_ofx.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.ofx """ +"""Unit tests for models.ofx""" # stdlib imports import unittest from xml.etree.ElementTree import Element diff --git a/tests/test_models_profile.py b/tests/test_models_profile.py index 8afcd96..09a84bf 100644 --- a/tests/test_models_profile.py +++ b/tests/test_models_profile.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.profile """ +"""Unit tests for models.profile""" # stdlib imports import unittest from xml.etree.ElementTree import Element, SubElement diff --git a/tests/test_models_securities.py b/tests/test_models_securities.py index a27f507..c5d5cef 100644 --- a/tests/test_models_securities.py +++ b/tests/test_models_securities.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for ofxtools.models.seclist """ +"""Unit tests for ofxtools.models.seclist""" # stdlib imports import unittest diff --git a/tests/test_models_signon.py b/tests/test_models_signon.py index 602bd10..424d628 100644 --- a/tests/test_models_signon.py +++ b/tests/test_models_signon.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for models.signon """ +"""Unit tests for models.signon""" # stdlib imports import unittest from xml.etree.ElementTree import Element, SubElement diff --git a/tests/test_models_signup.py b/tests/test_models_signup.py index d44babe..367f6a3 100644 --- a/tests/test_models_signup.py +++ b/tests/test_models_signup.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for ofxtools.models.signup """ +"""Unit tests for ofxtools.models.signup""" # stdlib imports import unittest from xml.etree.ElementTree import Element, SubElement diff --git a/tests/test_ofxget.py b/tests/test_ofxget.py index 37d00cd..354cfda 100644 --- a/tests/test_ofxget.py +++ b/tests/test_ofxget.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for ofxtools.ofxget """ +"""Unit tests for ofxtools.ofxget""" # stdlib imports import unittest diff --git a/tests/test_ofxhome.py b/tests/test_ofxhome.py index 34eda70..a9c4652 100644 --- a/tests/test_ofxhome.py +++ b/tests/test_ofxhome.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for ofxtools.ofxhome """ +"""Unit tests for ofxtools.ofxhome""" # stdlib imports import unittest diff --git a/tests/test_parser.py b/tests/test_parser.py index 24f5289..8431e76 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for ofxtools.Parser """ +"""Unit tests for ofxtools.Parser""" # stdlib imports import unittest diff --git a/tests/test_types.py b/tests/test_types.py index 690f96a..198f37a 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for ofxtools.Types """ +"""Unit tests for ofxtools.Types""" # stdlib imports import unittest import decimal @@ -410,7 +410,7 @@ def test_unconvert_roundtrip(self): self.assertEqual(t.convert(t.unconvert(value)), value) -class TestingTimezone(datetime.tzinfo): +class _TestingTimezone(datetime.tzinfo): """Timezone info class for testing purposes""" def __init__(self, name: str, offset: datetime.timedelta): @@ -427,9 +427,9 @@ def tzname(self, dst: Optional[datetime.datetime]) -> Optional[str]: return self.name -CST = TestingTimezone("CST", datetime.timedelta(hours=-6)) -IST = TestingTimezone("IST", datetime.timedelta(hours=5, minutes=30)) -NST = TestingTimezone("NST", datetime.timedelta(hours=-3.5)) +CST = _TestingTimezone("CST", datetime.timedelta(hours=-6)) +IST = _TestingTimezone("IST", datetime.timedelta(hours=5, minutes=30)) +NST = _TestingTimezone("NST", datetime.timedelta(hours=-3.5)) class DateTimeTestCase(unittest.TestCase, Base): diff --git a/tests/test_utils.py b/tests/test_utils.py index 90ee27f..f0458bd 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,5 +1,5 @@ # coding: utf-8 -""" Unit tests for ofxtools.utils """ +"""Unit tests for ofxtools.utils""" # stdlib imports import unittest import os