diff --git a/crates/erg_compiler/lib/external/certifi.d/__init__.d.er b/crates/erg_compiler/lib/external/certifi.d/__init__.d.er new file mode 100644 index 00000000..868837c5 --- /dev/null +++ b/crates/erg_compiler/lib/external/certifi.d/__init__.d.er @@ -0,0 +1,3 @@ +.core = pyimport "./core" + +{.contents!; .where!} = .core diff --git a/crates/erg_compiler/lib/external/certifi.d/core.d.er b/crates/erg_compiler/lib/external/certifi.d/core.d.er new file mode 100644 index 00000000..e0921f98 --- /dev/null +++ b/crates/erg_compiler/lib/external/certifi.d/core.d.er @@ -0,0 +1,2 @@ +.contents!: () => Str +.where!: () => Str diff --git a/crates/erg_compiler/lib/external/certifi.d/package.er b/crates/erg_compiler/lib/external/certifi.d/package.er new file mode 100644 index 00000000..e69de29b diff --git a/crates/erg_compiler/lib/external/idna.d/__init__.d.er b/crates/erg_compiler/lib/external/idna.d/__init__.d.er new file mode 100644 index 00000000..23f1a656 --- /dev/null +++ b/crates/erg_compiler/lib/external/idna.d/__init__.d.er @@ -0,0 +1,18 @@ +.core = pyimport "./core" + +{ + .alabel; + .check_bidi; + .check_hyphen_ok; + .check_initial_combiner; + .check_label; + .check_nfc; + .decode; + .encode; + .ulabel; + .uts46_remap; + .valid_contextj; + .valid_contexto; + .valid_label_length; + .valid_string_length; +} = .core diff --git a/crates/erg_compiler/lib/external/idna.d/core.d.er b/crates/erg_compiler/lib/external/idna.d/core.d.er new file mode 100644 index 00000000..3d7ac0bf --- /dev/null +++ b/crates/erg_compiler/lib/external/idna.d/core.d.er @@ -0,0 +1,33 @@ +.IDNAError: ClassType +.IDNABidiError: ClassType +.IDNABidiError <: .IDNAError +.InvalidCodepoint: ClassType +.InvalidCodepoint <: .IDNAError +.InvalidCodepointContext: ClassType +.InvalidCodepointContext <: .IDNAError + +.valid_label_length: (label: Str or Bytes) -> Bool +.valid_string_length: (label: Str or Bytes, trailing_dot: Bool) -> Bool +.check_bidi: (label: Str, check_ltr := Bool) -> Bool +.check_initial_combiner: (label: Str) -> Bool +.check_hyphen_ok: (label: Str) -> Bool +.check_nfc: (label: Str) -> Bool +.valid_contextj: (label: Str, pos: Int) -> Bool +.valid_contexto: (label: Str, pos: Int, exception := Bool) -> Bool +.check_label: (label: Str or Bytes) -> NoneType +.alabel: (label: Str) -> Bytes +.ulabel: (label: Str or Bytes) -> Str +.uts46_remap: (domain: Str or Bytes, std3_rules := Bool, transitional := Bool) -> Str +.encode: ( + s: Str or Bytes, + strict:= Bool, + uts46:= Bool, + std3_rules:= Bool, + transitional:= Bool, +) -> Bytes +.decode: ( + s: Str or Bytes, + strict:= Bool, + uts46:= Bool, + std3_rules:= Bool, +) -> Str diff --git a/crates/erg_compiler/lib/external/idna.d/package.er b/crates/erg_compiler/lib/external/idna.d/package.er new file mode 100644 index 00000000..e69de29b diff --git a/crates/erg_compiler/lib/external/packaging.d/__init__.d.er b/crates/erg_compiler/lib/external/packaging.d/__init__.d.er new file mode 100644 index 00000000..cd8dd60d --- /dev/null +++ b/crates/erg_compiler/lib/external/packaging.d/__init__.d.er @@ -0,0 +1 @@ +.version = pyimport "./version" diff --git a/crates/erg_compiler/lib/external/packaging.d/package.er b/crates/erg_compiler/lib/external/packaging.d/package.er new file mode 100644 index 00000000..e69de29b diff --git a/crates/erg_compiler/lib/external/packaging.d/version.d.er b/crates/erg_compiler/lib/external/packaging.d/version.d.er new file mode 100644 index 00000000..e7138c3e --- /dev/null +++ b/crates/erg_compiler/lib/external/packaging.d/version.d.er @@ -0,0 +1,23 @@ +.Version: ClassType +.Version <: Eq +.Version <: Ord +.Version. + epoch: Nat + release: (Nat, Nat, Nat) + pre: (Str, Nat) or NoneType + post: Nat or NoneType + dev: Nat or NoneType + local: Str or NoneType + public: Str + base_version: Str + is_prerelease: Bool + is_postrelease: Bool + is_devrelease: Bool + major: Nat + minor: Nat + micro: Nat + __call__: (ver: Str) -> .Version + +.InvalidVersion: ClassType + +.parse: (ver: Str) -> .Version diff --git a/crates/erg_compiler/lib/external/six.d/__init__.d.er b/crates/erg_compiler/lib/external/six.d/__init__.d.er new file mode 100644 index 00000000..9034c3b3 --- /dev/null +++ b/crates/erg_compiler/lib/external/six.d/__init__.d.er @@ -0,0 +1,13 @@ +.PY2: Bool +.PY3: Bool + +.class_types: [Type; _] +.intger_types: [Type; _] +.string_types: [Type; _] +.float_types: [Type; _] +.text_type: Type +.binary_type: Type +.MAXSIZE: Nat + +.exec_!: (code: Str, globals := {Str: Obj}, locals := {Str: Obj}) => Obj +.print_!: (*objs: [Obj; _], end := Str, sep := Str) => NoneType diff --git a/crates/erg_compiler/lib/external/six.d/package.er b/crates/erg_compiler/lib/external/six.d/package.er new file mode 100644 index 00000000..e69de29b