Clean up, remove compat with py < 3.6
[pyi2ncommon] / src / mail_utils.py
index ed128df..e3339a1 100644 (file)
@@ -37,16 +37,11 @@ INTERFACE
 
 """
 
-import os
 from base64 import b64decode
-import re
-import logging
 from email.utils import parsedate_to_datetime
 from email.parser import BytesParser
 from email import policy
 
-from . import arnied_wrapper
-
 # outsourced source, import required for compatiblity
 from .imap_mailbox import ImapMailbox           # pylint: disable=unused-import
 from .mail_validator import *                   # pylint: disable=unused-import
@@ -341,7 +336,7 @@ def cyrus_escape(user_or_folder, keep_path=False, regex=False):
     * inbox -->   (the empty string)
 
     Would like to use a general modified utf-7-encoder/decoder but python has
-    non built-in (see https://bugs.python.org/issue5305) and an extra lib like
+    none builtin (see https://bugs.python.org/issue5305) and an extra lib like
     https://bitbucket.org/mjs0/imapclient/ would be overkill. After all, we
     control the input to this function via params and this is enough umlaut-
     testing I think...
@@ -393,7 +388,7 @@ def get_filename(message, failobj=None, do_unwrap=True):
 
     Only for ascii filenames: also unwraps file names if they are line-wrapped.
     But note that this may remove too much whitespace from the filename if
-    line-wrapping happend in the same position as the filename's whitespace.
+    line-wrapping happened in the same position as the filename's whitespace.
     To get unwrapped version, set param `do_unwrap` to `False`.
 
     See also: https://en.wikipedia.org/wiki/MIME#Encoded-Word