name.pyi 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. from typing import Optional, Union, Tuple, Iterable, List
  2. class Name:
  3. def is_subdomain(self, o : Name) -> bool: ...
  4. def is_superdomain(self, o : Name) -> bool: ...
  5. def __init__(self, labels : Iterable[Union[bytes,str]]) -> None:
  6. self.labels : List[bytes]
  7. def is_absolute(self) -> bool: ...
  8. def is_wild(self) -> bool: ...
  9. def fullcompare(self, other) -> Tuple[int,int,int]: ...
  10. def canonicalize(self) -> Name: ...
  11. def __lt__(self, other : Name): ...
  12. def __le__(self, other : Name): ...
  13. def __ge__(self, other : Name): ...
  14. def __gt__(self, other : Name): ...
  15. def to_text(self, omit_final_dot=False) -> str: ...
  16. def to_unicode(self, omit_final_dot=False, idna_codec=None) -> str: ...
  17. def to_digestable(self, origin=None) -> bytes: ...
  18. def to_wire(self, file=None, compress=None, origin=None) -> Optional[bytes]: ...
  19. def __add__(self, other : Name): ...
  20. def __sub__(self, other : Name): ...
  21. def split(self, depth) -> List[Tuple[str,str]]: ...
  22. def concatenate(self, other : Name) -> Name: ...
  23. def relativize(self, origin): ...
  24. def derelativize(self, origin): ...
  25. def choose_relativity(self, origin : Optional[Name] = None, relativize=True): ...
  26. def parent(self) -> Name: ...
  27. class IDNACodec:
  28. pass
  29. def from_text(text, origin : Optional[Name] = Name('.'), idna_codec : Optional[IDNACodec] = None) -> Name:
  30. ...
  31. empty : Name