Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.15"
include:
- python: "3.10"
tox-env: "py310"
Expand All @@ -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
Expand All @@ -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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
repos:
- repo: https://github.com/PyCQA/flake8
rev: 7.2.0
rev: 7.5.0
hooks:
- id: flake8
name: Style Guide Enforcement (flake8)
args:
- '--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
Expand All @@ -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)
6 changes: 3 additions & 3 deletions mailtrap/models/mail/batch_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ 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


@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]
Expand Down
4 changes: 2 additions & 2 deletions mailtrap/models/mail/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ 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


@dataclass
class MailFromTemplate(BaseMail):
template_uuid: str = Field(...) # type:ignore
template_uuid: str = Field(...) # type: ignore
template_variables: Optional[dict[str, Any]] = None


Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading