Clean up, remove compat with py < 3.6
[pyi2ncommon] / src / mail_validator.py
index 8c93af7..7888665 100644 (file)
@@ -93,7 +93,7 @@ class EmailMismatch(EmailException):        # pylint: disable=missing-docstring
     pass
 
 
-class MailValidator():
+class MailValidator:
     """Class for validation of emails."""
 
     def target_path(self, new_value=None):
@@ -242,7 +242,7 @@ class MailValidator():
         :param bool in_target: whether the verified email is on the target side
 
         If `in_target` is set to True we are getting the target id from the
-        target list of a source email. Otherwise we assume a target email from
+        target list of a source email. Otherwise, we assume a target email from
         a source list.
         """
         if in_target:
@@ -435,6 +435,7 @@ class MailValidator():
                                    X-Autotest-Signature for simpler recognition
                                    of mail (if None do not add header)
         :type autotest_signature: str or None
+        :param str subject: Subject of created mails
         """
         text = 'This is an autogenerated email.\n'
 
@@ -567,9 +568,8 @@ class MailValidator():
             if match_id is not None:
                 message_id = match_id.group(1).rstrip('\r\n')
         if message_id == "":
-            raise MissingEmailID("No id was found in target message %s so it "
-                                 "cannot be properly matched"
-                                 % (message_path))
+            raise MissingEmailID(f"No id was found in target message {message_path}, "
+                                 f"so it cannot be properly matched")
         return message_id
 
     def _default_compare_emails(self, source_email_path, target_email_path,