diff --git a/pyas2lib/as2.py b/pyas2lib/as2.py index d81fa1d..460ec82 100644 --- a/pyas2lib/as2.py +++ b/pyas2lib/as2.py @@ -381,7 +381,9 @@ def build( self.message_id = f"{message_id}@{self.sender.domain}" else: self.message_id = ( - email_utils.make_msgid(domain=self.sender.domain).lstrip("<").rstrip(">") + email_utils.make_msgid(domain=self.sender.domain) + .lstrip("<") + .rstrip(">") ) # ensure the total length of the message id is no more than 255 characters diff --git a/pyas2lib/tests/test_basic.py b/pyas2lib/tests/test_basic.py index aac10fc..fed94b9 100644 --- a/pyas2lib/tests/test_basic.py +++ b/pyas2lib/tests/test_basic.py @@ -219,7 +219,10 @@ def test_invalid_message_id_length_raises_error(self): very_long_message_id = "a" * 1000 with pytest.raises(ValueError) as excinfo: out_message.build(self.test_data, message_id=very_long_message_id) - assert "Message ID must be no more than 255 characters for compatibility" in str(excinfo.value) + assert ( + "Message ID must be no more than 255 characters for compatibility" + in str(excinfo.value) + ) def find_org(self, as2_id): return self.org