From 14a114156101479727da288385450e2333730fc7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2026 16:48:04 +0000 Subject: [PATCH 1/2] Bump the hooks group with 5 updates Bumps the hooks group with 5 updates: | Package | From | To | | --- | --- | --- | | [https://github.com/PyCQA/flake8](https://github.com/PyCQA/flake8) | `7.2.0` | `7.5.0` | | [https://github.com/asottile/pyupgrade](https://github.com/asottile/pyupgrade) | `v3.19.0` | `3.22.0` | | [https://github.com/pycqa/isort](https://github.com/pycqa/isort) | `6.0.1` | `9.0.2` | | [https://github.com/pre-commit/pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks) | `v5.0.0` | `6.0.0` | | [https://github.com/python/black](https://github.com/python/black) | `25.1.0` | `26.10.1` | Updates `https://github.com/PyCQA/flake8` from 7.2.0 to 7.5.0 - [Commits](https://github.com/PyCQA/flake8/compare/7.2.0...7.5.0) Updates `https://github.com/asottile/pyupgrade` from v3.19.0 to 3.22.0 - [Commits](https://github.com/asottile/pyupgrade/compare/v3.19.0...v3.22.0) Updates `https://github.com/pycqa/isort` from 6.0.1 to 9.0.2 - [Release notes](https://github.com/pycqa/isort/releases) - [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md) - [Commits](https://github.com/pycqa/isort/compare/6.0.1...9.0.2) Updates `https://github.com/pre-commit/pre-commit-hooks` from v5.0.0 to 6.0.0 - [Release notes](https://github.com/pre-commit/pre-commit-hooks/releases) - [Changelog](https://github.com/pre-commit/pre-commit-hooks/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) Updates `https://github.com/python/black` from 25.1.0 to 26.10.1 - [Release notes](https://github.com/python/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/python/black/compare/25.1.0...26.10.1) --- updated-dependencies: - dependency-name: https://github.com/PyCQA/flake8 dependency-version: 7.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: hooks - dependency-name: https://github.com/asottile/pyupgrade dependency-version: 3.22.0 dependency-type: direct:production dependency-group: hooks - dependency-name: https://github.com/pycqa/isort dependency-version: 9.0.2 dependency-type: direct:production update-type: version-update:semver-major dependency-group: hooks - dependency-name: https://github.com/pre-commit/pre-commit-hooks dependency-version: 6.0.0 dependency-type: direct:production dependency-group: hooks - dependency-name: https://github.com/python/black dependency-version: 26.10.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: hooks ... Signed-off-by: dependabot[bot] --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7eabe39..e807e68 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/PyCQA/flake8 - rev: 7.2.0 + rev: 7.5.0 hooks: - id: flake8 name: Style Guide Enforcement (flake8) @@ -8,14 +8,14 @@ repos: - '--max-line-length=90' - '--per-file-ignores=__init__.py:F401' - repo: https://github.com/asottile/pyupgrade - rev: v3.19.0 + rev: v3.22.0 hooks: - id: pyupgrade name: Upgrade syntax for newer versions of the language (pyupgrade) args: - '--py39-plus' - repo: https://github.com/pycqa/isort - rev: 6.0.1 + rev: 9.0.2 hooks: - id: isort name: Reorder Python imports @@ -27,13 +27,13 @@ repos: # args: # - '--in-place ' - repo: 'https://github.com/pre-commit/pre-commit-hooks' - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-toml - repo: https://github.com/python/black - rev: 25.1.0 + rev: 26.10.1 hooks: - id: black name: Uncompromising Code Formatter (black) From 4c4ce7c7aab5e7b01a64675f9bb78c560f3dc90e Mon Sep 17 00:00:00 2001 From: Maciej Walusiak Date: Wed, 2 Dec 2026 08:23:48 +0100 Subject: [PATCH 2/2] Skip linters on Python 3.10 and test on Python 3.14 and 3.15 flake8 7.5.0 and pyupgrade 3.22.0 need Python 3.11+, so the linters step can no longer run on the Python 3.10 jobs. The package still supports 3.10, so its tests and type checks keep running there. Decisions: - Skip only the linters step on 3.10: lint results do not depend on the Python version, and newer jobs still lint every push. - Add 3.14 and 3.15 to the CI matrix and tox envlist so the SDK is tested on current Python releases. - Apply black 26's "# type: ignore" comment normalization. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/main.yml | 8 ++++++++ mailtrap/models/mail/batch_mail.py | 6 +++--- mailtrap/models/mail/mail.py | 4 ++-- tox.ini | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 200dee1..923124a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,6 +23,8 @@ jobs: - "3.11" - "3.12" - "3.13" + - "3.14" + - "3.15" include: - python: "3.10" tox-env: "py310" @@ -32,6 +34,10 @@ jobs: tox-env: "py312" - python: "3.13" tox-env: "py313" + - python: "3.14" + tox-env: "py314" + - python: "3.15" + tox-env: "py315" steps: - uses: actions/checkout@v7 - name: Setup python @@ -43,6 +49,8 @@ jobs: - name: Run tests run: tox -e ${{ matrix.tox-env }} - name: Run linters + # flake8 and pyupgrade need Python 3.11+ + if: matrix.python != '3.10' run: tox -e pre-commit - name: Run type checking run: tox -e mypy diff --git a/mailtrap/models/mail/batch_mail.py b/mailtrap/models/mail/batch_mail.py index 0b8ab51..8ba5f64 100644 --- a/mailtrap/models/mail/batch_mail.py +++ b/mailtrap/models/mail/batch_mail.py @@ -21,7 +21,7 @@ class BaseBatchMail(RequestParams): @dataclass class BatchMail(BaseBatchMail): - subject: str = Field(...) # type:ignore + subject: str = Field(...) # type: ignore text: Optional[str] = None html: Optional[str] = None category: Optional[str] = None @@ -29,13 +29,13 @@ class BatchMail(BaseBatchMail): @dataclass class BatchMailFromTemplate(BaseBatchMail): - template_uuid: str = Field(...) # type:ignore + template_uuid: str = Field(...) # type: ignore template_variables: Optional[dict[str, Any]] = None @dataclass class BatchEmailRequest(BaseBatchMail): - to: list[Address] = Field(...) # type:ignore + to: list[Address] = Field(...) # type: ignore sender: Optional[Address] = Field( None, serialization_alias="from" ) # type: ignore[assignment] diff --git a/mailtrap/models/mail/mail.py b/mailtrap/models/mail/mail.py index c55c130..3a86b17 100644 --- a/mailtrap/models/mail/mail.py +++ b/mailtrap/models/mail/mail.py @@ -23,7 +23,7 @@ class BaseMail(RequestParams): @dataclass class Mail(BaseMail): - subject: str = Field(...) # type:ignore + subject: str = Field(...) # type: ignore text: Optional[str] = None html: Optional[str] = None category: Optional[str] = None @@ -31,7 +31,7 @@ class Mail(BaseMail): @dataclass class MailFromTemplate(BaseMail): - template_uuid: str = Field(...) # type:ignore + template_uuid: str = Field(...) # type: ignore template_variables: Optional[dict[str, Any]] = None diff --git a/tox.ini b/tox.ini index 520b0be..57839c9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] isolated_build = true envlist = - py{310,311,312,313}, + py{310,311,312,313,314,315}, pre-commit mypy skip_missing_interpreters = true