diff --git a/crates/erg_compiler/lib/pystd/email.d/__init__.d.er b/crates/erg_compiler/lib/pystd/email.d/__init__.d.er new file mode 100644 index 000000000..6a3bdf8e4 --- /dev/null +++ b/crates/erg_compiler/lib/pystd/email.d/__init__.d.er @@ -0,0 +1,7 @@ +.contentmanager = pyimport "./contentmanager" +.errors = pyimport "./errors" +.generator = pyimport "./generator" +.headerregistry = pyimport "./headerregistry" +.message = pyimport "./message" +.parser = pyimport "./parser" +.policy = pyimport "./policy" diff --git a/crates/erg_compiler/lib/pystd/email.d/contentmanager.d.er b/crates/erg_compiler/lib/pystd/email.d/contentmanager.d.er new file mode 100644 index 000000000..9816f4dc7 --- /dev/null +++ b/crates/erg_compiler/lib/pystd/email.d/contentmanager.d.er @@ -0,0 +1,5 @@ +{Message!;} = pyimport "./message" + +.ContentManager: ClassType + +.set_text_content!: (msg: Message!, string: Str, subtype := Str) => NoneType diff --git a/crates/erg_compiler/lib/pystd/email.d/errors.d.er b/crates/erg_compiler/lib/pystd/email.d/errors.d.er new file mode 100644 index 000000000..2382a4453 --- /dev/null +++ b/crates/erg_compiler/lib/pystd/email.d/errors.d.er @@ -0,0 +1,74 @@ +.MessageError: ClassType +.MessageError <: Exception + +.MessageParseError: ClassType +.MessageParseError <: MessageError + +.HeaderParseError: ClassType +.HeaderParseError <: MessageParseError + +.BoundaryError: ClassType +.BoundaryError <: MessageParseError + +.MultipartConversionError: ClassType +.MultipartConversionError <: MessageError + +.CharsetError: ClassType +.CharsetError <: MessageError + +.MessageDefect: ClassType +.MessageDefect <: ValueError + +.NoBoundaryInMultipartDefect: ClassType +.NoBoundaryInMultipartDefect <: MessageDefect + +.StartBoundaryNotFoundDefect: ClassType +.StartBoundaryNotFoundDefect <: MessageDefect + +.ClosedBoundaryNotFoundDefect: ClassType +.ClosedBoundaryNotFoundDefect <: MessageDefect + +.FirstHeaderLineIsContinuationDefect: ClassType +.FirstHeaderLineIsContinuationDefect <: MessageDefect + +.MisplacedEnvelopeHeaderDefect: ClassType +.MisplacedEnvelopeHeaderDefect <: MessageDefect + +.MultipartInvariantViolationDefect: ClassType +.MultipartInvariantViolationDefect <: MessageDefect + +.InvalidMultipartContentTransferEncodingDefect: ClassType +.InvalidMultipartContentTransferEncodingDefect <: MessageDefect + +.UndecodableBytesDefect: ClassType +.UndecodableBytesDefect <: MessageDefect + +.InvalidBase64PaddingDefect: ClassType +.InvalidBase64PaddingDefect <: MessageDefect + +.InvalidBase64CharactersDefect: ClassType +.InvalidBase64CharactersDefect <: MessageDefect + +.InvalidBase64LengthDefect: ClassType +.InvalidBase64LengthDefect <: MessageDefect + +.HeaderDefect: ClassType +.HeaderDefect <: MessageDefect + +.InvalidHeaderDefect: ClassType +.InvalidHeaderDefect <: HeaderDefect + +.HeaderMissingRequiredValue: ClassType +.HeaderMissingRequiredValue <: HeaderDefect + +.NonPrintableDefect: ClassType +.NonPrintableDefect <: HeaderDefect + +.ObsoleteHeaderDefect: ClassType +.ObsoleteHeaderDefect <: HeaderDefect + +.NonASCIILocalPartDefect: ClassType +.NonASCIILocalPartDefect <: HeaderDefect + +.InvalidDateDefect: ClassType +.InvalidDateDefect <: HeaderDefect diff --git a/crates/erg_compiler/lib/pystd/email.d/generator.d.er b/crates/erg_compiler/lib/pystd/email.d/generator.d.er new file mode 100644 index 000000000..d82cfc754 --- /dev/null +++ b/crates/erg_compiler/lib/pystd/email.d/generator.d.er @@ -0,0 +1,7 @@ +.Generator: ClassType + +.BytesGenerator: ClassType +.BytesGenerator <: .Generator + +.DecodeGenerator: ClassType +.DecodeGenerator <: .Generator diff --git a/crates/erg_compiler/lib/pystd/email.d/headerregistry.d.er b/crates/erg_compiler/lib/pystd/email.d/headerregistry.d.er new file mode 100644 index 000000000..5ad6c5376 --- /dev/null +++ b/crates/erg_compiler/lib/pystd/email.d/headerregistry.d.er @@ -0,0 +1,39 @@ +.Address: ClassType + +.Group: ClassType + +.BaseHeader: ClassType + +.UnstructuredHeader: ClassType + +.UniqueUnstructuredHeader: ClassType +.UniqueUnstructuredHeader <: .UnstructuredHeader + +.DateHeader: ClassType + +.AddressHeader: ClassType + +.UniqueAddressHeader: ClassType +.UniqueAddressHeader <: .AddressHeader + +.SingleAddressHeader: ClassType +.SingleAddressHeader <: .AddressHeader + +.UniqueSingleAddressHeader: ClassType +.UniqueSingleAddressHeader <: .SingleAddressHeader + +.MIMEVersionHeader: ClassType + +.ParameterizedMIMEHeader: ClassType + +.ContentTypeHeader: ClassType +.ContentTypeHeader <: .ParameterizedMIMEHeader + +.ContentDispositionHeader: ClassType +.ContentDispositionHeader <: .ParameterizedMIMEHeader + +.ContentTransferEncodingHeader: ClassType + +.MessageIDHeader: ClassType + +.Headerregistry: ClassType diff --git a/crates/erg_compiler/lib/pystd/email.d/message.d.er b/crates/erg_compiler/lib/pystd/email.d/message.d.er new file mode 100644 index 000000000..a44f2f988 --- /dev/null +++ b/crates/erg_compiler/lib/pystd/email.d/message.d.er @@ -0,0 +1 @@ +.Message!: ClassType diff --git a/crates/erg_compiler/lib/pystd/email.d/parser.d.er b/crates/erg_compiler/lib/pystd/email.d/parser.d.er new file mode 100644 index 000000000..985d3092d --- /dev/null +++ b/crates/erg_compiler/lib/pystd/email.d/parser.d.er @@ -0,0 +1,6 @@ +.Parser: ClassType +.HeaderParser: ClassType +.HeaderParser <: .Parser +.BytesParser: ClassType +.BytesHeaderParser: ClassType +.BytesHeaderParser <: .BytesParser diff --git a/crates/erg_compiler/lib/pystd/email.d/policy.d.er b/crates/erg_compiler/lib/pystd/email.d/policy.d.er new file mode 100644 index 000000000..d22cb7698 --- /dev/null +++ b/crates/erg_compiler/lib/pystd/email.d/policy.d.er @@ -0,0 +1,7 @@ +.EmailPolicy: ClassType + +.default: .EmailPolicy +.strict: .EmailPolicy +.SMTP: .EmailPolicy +.HTTP: .EmailPolicy +.SMTPUTF8: .EmailPolicy