From: Tamir Duberstein <tamird@gmail.com>
To: "Kernel.org Tools" <tools@kernel.org>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
Tamir Duberstein <tamird@gmail.com>
Subject: [PATCH b4 5/5] Add missing imports
Date: Fri, 25 Oct 2024 16:16:07 -0400 [thread overview]
Message-ID: <20241025-better-type-annotations-v1-5-9d7a00a8d754@gmail.com> (raw)
In-Reply-To: <20241025-better-type-annotations-v1-0-9d7a00a8d754@gmail.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
src/b4/__init__.py | 9 +++++----
src/b4/diff.py | 1 +
src/b4/ez.py | 2 ++
src/b4/pr.py | 2 ++
src/b4/ty.py | 1 +
src/tests/test___init__.py | 1 +
6 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/b4/__init__.py b/src/b4/__init__.py
index e71fbe7d8ea8d4ca19228690ce7c186cc91b81ad..7b1925da93e1b3feadf669cc188ab6fb030f67f4 100644
--- a/src/b4/__init__.py
+++ b/src/b4/__init__.py
@@ -8,12 +8,13 @@ import sys
import gzip
import os
import fnmatch
-import email.utils
-import email.policy
-import email.parser
-import email.header
import email.generator
+import email.header
+import email.message
+import email.parser
+import email.policy
import email.quoprimime
+import email.utils
import tempfile
import pathlib
import argparse
diff --git a/src/b4/diff.py b/src/b4/diff.py
index 743127ef0a1922eace81686e27cd0366f8e42f9c..1de3063ea0b3c73e4e3d8bfd4ec91b4c6f90cce6 100644
--- a/src/b4/diff.py
+++ b/src/b4/diff.py
@@ -11,6 +11,7 @@ import b4
import b4.mbox
import mailbox
import email
+import email.message
import email.parser
import shutil
import pathlib
diff --git a/src/b4/ez.py b/src/b4/ez.py
index 970631592d2139b12ee4a6a9a112081eee1de721..9494b005a4f47a7be9cb053cc6075dede29d4cb0 100644
--- a/src/b4/ez.py
+++ b/src/b4/ez.py
@@ -17,6 +17,8 @@ import datetime
import json
import shlex
import email
+import email.policy
+import email.utils
import pathlib
import base64
import textwrap
diff --git a/src/b4/pr.py b/src/b4/pr.py
index b6eb5d3933d7e0bb1224877f071bb19facd8dbd8..60f46f1e3fa96a52a9d667bffb43c2a75b89cc4e 100644
--- a/src/b4/pr.py
+++ b/src/b4/pr.py
@@ -13,7 +13,9 @@ import b4
import re
import json
import email
+import email.message
import email.parser
+import email.utils
import argparse
import urllib.parse
diff --git a/src/b4/ty.py b/src/b4/ty.py
index e1afb61280d2161a054d40ae78df0d4b33dbb41d..021588ff9e559cfd8aa7c6818cdeba750931e8f6 100644
--- a/src/b4/ty.py
+++ b/src/b4/ty.py
@@ -13,6 +13,7 @@ import re
import email
import email.message
import email.policy
+import email.utils
import json
import argparse
diff --git a/src/tests/test___init__.py b/src/tests/test___init__.py
index 297e5120a8c8adf241660f06e9a83c1ff4a0fd3a..3e01c2f5e127cd1123d0fb8503493e396148ee73 100644
--- a/src/tests/test___init__.py
+++ b/src/tests/test___init__.py
@@ -35,6 +35,7 @@ def test_save_git_am_mbox(sampledir, tmp_path, source, regex, flags, ismbox):
msgs = list(mbx)
else:
import email
+ import email.parser
with open(f'{sampledir}/{source}.txt', 'rb') as fh:
msg = email.parser.BytesParser(policy=b4.emlpolicy, _class=email.message.EmailMessage).parse(fh)
msgs = [msg]
--
2.47.0
next prev parent reply other threads:[~2024-10-25 20:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 20:16 [PATCH b4 0/5] Resolve some static typing errors Tamir Duberstein
2024-10-25 20:16 ` [PATCH b4 1/5] Add development dependencies Tamir Duberstein
2024-10-25 20:16 ` [PATCH b4 2/5] Avoid file descriptor leak Tamir Duberstein
2024-10-25 20:16 ` [PATCH b4 3/5] Correctly type annotate generators Tamir Duberstein
2024-10-25 20:16 ` [PATCH b4 4/5] Provide overloads for git_run_command Tamir Duberstein
2024-10-25 20:16 ` Tamir Duberstein [this message]
2025-01-22 15:28 ` [PATCH b4 0/5] Resolve some static typing errors Konstantin Ryabitsev
2025-01-22 15:36 ` Konstantin Ryabitsev
2025-01-23 20:28 ` Tamir Duberstein
2025-02-06 17:53 ` Konstantin Ryabitsev
2025-02-06 18:23 ` Tamir Duberstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241025-better-type-annotations-v1-5-9d7a00a8d754@gmail.com \
--to=tamird@gmail.com \
--cc=konstantin@linuxfoundation.org \
--cc=tools@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).