mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Add a few missing stdlib modules (#4550)
This commit is contained in:
10
stdlib/2and3/_typeshed/xml.pyi
Normal file
10
stdlib/2and3/_typeshed/xml.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
# Stub-only types. This module does not exist at runtime.
|
||||
|
||||
from typing import Any, Optional
|
||||
from typing_extensions import Protocol
|
||||
|
||||
# As defined https://docs.python.org/3/library/xml.dom.html#domimplementation-objects
|
||||
class DOMImplementation(Protocol):
|
||||
def hasFeature(self, feature: str, version: Optional[str]) -> bool: ...
|
||||
def createDocument(self, namespaceUri: str, qualifiedName: str, doctype: Optional[Any]) -> Any: ...
|
||||
def createDocumentType(self, qualifiedName: str, publicId: str, systemId: str) -> Any: ...
|
||||
10
stdlib/2and3/distutils/command/install_egg_info.pyi
Normal file
10
stdlib/2and3/distutils/command/install_egg_info.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from distutils.cmd import Command
|
||||
from typing import ClassVar, List, Optional, Tuple
|
||||
|
||||
class install_egg_info(Command):
|
||||
description: ClassVar[str]
|
||||
user_options: ClassVar[List[Tuple[str, Optional[str], str]]]
|
||||
def initialize_options(self) -> None: ...
|
||||
def finalize_options(self) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
def get_outputs(self) -> List[str]: ...
|
||||
8
stdlib/2and3/distutils/command/upload.pyi
Normal file
8
stdlib/2and3/distutils/command/upload.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
from distutils.config import PyPIRCCommand
|
||||
from typing import ClassVar, List, Optional, Tuple
|
||||
|
||||
class upload(PyPIRCCommand):
|
||||
description: ClassVar[str]
|
||||
boolean_options: ClassVar[List[str]]
|
||||
def run(self) -> None: ...
|
||||
def upload_file(self, command, pyversion, filename) -> None: ...
|
||||
17
stdlib/2and3/distutils/config.pyi
Normal file
17
stdlib/2and3/distutils/config.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
from abc import abstractmethod
|
||||
from distutils.cmd import Command
|
||||
from typing import ClassVar, List, Optional, Tuple
|
||||
|
||||
DEFAULT_PYPIRC: str
|
||||
|
||||
class PyPIRCCommand(Command):
|
||||
DEFAULT_REPOSITORY: ClassVar[str]
|
||||
DEFAULT_REALM: ClassVar[str]
|
||||
repository: None
|
||||
realm: None
|
||||
user_options: ClassVar[List[Tuple[str, Optional[str], str]]]
|
||||
boolean_options: ClassVar[List[str]]
|
||||
def initialize_options(self) -> None: ...
|
||||
def finalize_options(self) -> None: ...
|
||||
@abstractmethod
|
||||
def run(self) -> None: ...
|
||||
@@ -1,5 +1,7 @@
|
||||
from typing import Any
|
||||
|
||||
from .domreg import getDOMImplementation as getDOMImplementation, registerDOMImplementation as registerDOMImplementation
|
||||
|
||||
class Node:
|
||||
ELEMENT_NODE: int
|
||||
ATTRIBUTE_NODE: int
|
||||
|
||||
10
stdlib/2and3/xml/dom/domreg.pyi
Normal file
10
stdlib/2and3/xml/dom/domreg.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from _typeshed.xml import DOMImplementation
|
||||
from typing import Any, Callable, Dict, Iterable, Optional, Tuple, Union
|
||||
|
||||
well_known_implementations: Dict[str, str]
|
||||
registered: Dict[str, Callable[[], DOMImplementation]]
|
||||
|
||||
def registerDOMImplementation(name: str, factory: Callable[[], DOMImplementation]) -> None: ...
|
||||
def getDOMImplementation(
|
||||
name: Optional[str] = ..., features: Union[str, Iterable[Tuple[str, Optional[str]]]] = ...
|
||||
) -> DOMImplementation: ...
|
||||
1
stdlib/3/json/tool.pyi
Normal file
1
stdlib/3/json/tool.pyi
Normal file
@@ -0,0 +1 @@
|
||||
def main() -> None: ...
|
||||
Reference in New Issue
Block a user