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/.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) 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