mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Add default values for third-party stubs beginning with 'P' (#9957)
This commit is contained in:
@@ -53,19 +53,22 @@ __author__: str
|
||||
__version__: str
|
||||
|
||||
class PortScanner:
|
||||
def __init__(self, nmap_search_path: Iterable[str] = ...) -> None: ...
|
||||
def __init__(
|
||||
self,
|
||||
nmap_search_path: Iterable[str] = ("nmap", "/usr/bin/nmap", "/usr/local/bin/nmap", "/sw/bin/nmap", "/opt/local/bin/nmap"),
|
||||
) -> None: ...
|
||||
def get_nmap_last_output(self) -> str: ...
|
||||
def nmap_version(self) -> tuple[int, int]: ...
|
||||
def listscan(self, hosts: str = ...) -> list[str]: ...
|
||||
def listscan(self, hosts: str = "127.0.0.1") -> list[str]: ...
|
||||
def scan(
|
||||
self, hosts: str = ..., ports: str | None = ..., arguments: str = ..., sudo: bool = ..., timeout: int = ...
|
||||
self, hosts: str = "127.0.0.1", ports: str | None = None, arguments: str = "-sV", sudo: bool = False, timeout: int = 0
|
||||
) -> _Result: ...
|
||||
def analyse_nmap_xml_scan(
|
||||
self,
|
||||
nmap_xml_output: str | None = ...,
|
||||
nmap_err: str = ...,
|
||||
nmap_err_keep_trace: str = ...,
|
||||
nmap_warn_keep_trace: str = ...,
|
||||
nmap_xml_output: str | None = None,
|
||||
nmap_err: str = "",
|
||||
nmap_err_keep_trace: str = "",
|
||||
nmap_warn_keep_trace: str = "",
|
||||
) -> _Result: ...
|
||||
def __getitem__(self, host: str) -> PortScannerHostDict: ...
|
||||
def all_hosts(self) -> list[str]: ...
|
||||
@@ -84,24 +87,24 @@ class PortScannerAsync:
|
||||
def __del__(self) -> None: ...
|
||||
def scan(
|
||||
self,
|
||||
hosts: str = ...,
|
||||
ports: str | None = ...,
|
||||
arguments: str = ...,
|
||||
callback: _Callback | None = ...,
|
||||
sudo: bool = ...,
|
||||
timeout: int = ...,
|
||||
hosts: str = "127.0.0.1",
|
||||
ports: str | None = None,
|
||||
arguments: str = "-sV",
|
||||
callback: _Callback | None = None,
|
||||
sudo: bool = False,
|
||||
timeout: int = 0,
|
||||
) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def wait(self, timeout: int | None = ...) -> None: ...
|
||||
def wait(self, timeout: int | None = None) -> None: ...
|
||||
def still_scanning(self) -> bool: ...
|
||||
|
||||
class PortScannerYield(PortScannerAsync):
|
||||
def __init__(self) -> None: ...
|
||||
def scan( # type: ignore[override]
|
||||
self, hosts: str = ..., ports: str | None = ..., arguments: str = ..., sudo: bool = ..., timeout: int = ...
|
||||
self, hosts: str = "127.0.0.1", ports: str | None = None, arguments: str = "-sV", sudo: bool = False, timeout: int = 0
|
||||
) -> Iterator[tuple[str, _Result]]: ...
|
||||
def stop(self) -> None: ...
|
||||
def wait(self, timeout: int | None = ...) -> None: ...
|
||||
def wait(self, timeout: int | None = None) -> None: ...
|
||||
def still_scanning(self) -> None: ... # type: ignore[override]
|
||||
|
||||
class PortScannerHostDict(dict[str, Any]):
|
||||
@@ -129,4 +132,4 @@ class PortScannerError(Exception):
|
||||
|
||||
class PortScannerTimeout(PortScannerError): ...
|
||||
|
||||
def convert_nmap_output_to_encoding(value: _T, code: str = ...) -> _T: ...
|
||||
def convert_nmap_output_to_encoding(value: _T, code: str = "ascii") -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user