This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 401518c  Run mypy on test folder
401518c is described below

commit 401518ccce1e86e3627f99f82388e2c0fd9071ae
Author: Sebb <s...@apache.org>
AuthorDate: Sun Dec 8 13:48:26 2024 +0000

    Run mypy on test folder
---
 .github/workflows/type-tests.yml | 9 ++++++++-
 test/test_msgid.py               | 4 ++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/type-tests.yml b/.github/workflows/type-tests.yml
index 409f8c8..65dc5ec 100644
--- a/.github/workflows/type-tests.yml
+++ b/.github/workflows/type-tests.yml
@@ -34,7 +34,14 @@ jobs:
         pip install mypy
         pip install types-docutils
         pip list
-    - name: Type testing with mypy
+    - name: Type testing with mypy: tools
       run: |
           mypy --cache-dir /tmp/ --ignore-missing-imports tools
+    - name: Type testing with mypy: server
+      if: always()
+      run: |
           mypy --cache-dir /tmp/ --ignore-missing-imports server
+    - name: Type testing with mypy: test
+      if: always()
+      run: |
+          mypy --cache-dir /tmp/ --ignore-missing-imports test
diff --git a/test/test_msgid.py b/test/test_msgid.py
index 403c210..ceb40dd 100755
--- a/test/test_msgid.py
+++ b/test/test_msgid.py
@@ -14,8 +14,8 @@ class MyHeaderClass(email.headerregistry.UnstructuredHeader):
 
 # print(default.header_factory)
 policy = default.clone()
-policy.header_factory.map_to_type('references', MyHeaderClass)
-policy.header_factory.map_to_type('message-id', MyHeaderClass)
+policy.header_factory.map_to_type('references', MyHeaderClass) # type: ignore 
[attr-defined]
+policy.header_factory.map_to_type('message-id', MyHeaderClass) # type: ignore 
[attr-defined]
 
 def process(f):
     msg = email.message_from_binary_file(f, policy=policy)

Reply via email to