mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 04:11:28 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Text, Tuple, TypeVar
|
||||
from typing import Any, Callable, Dict, Iterable, Iterator, List, Text, Tuple, TypeVar
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
_T = TypeVar("_T")
|
||||
@@ -54,10 +54,10 @@ class PortScanner(object):
|
||||
def get_nmap_last_output(self) -> Text: ...
|
||||
def nmap_version(self) -> Tuple[int, int]: ...
|
||||
def listscan(self, hosts: str = ...) -> List[str]: ...
|
||||
def scan(self, hosts: Text = ..., ports: Optional[Text] = ..., arguments: Text = ..., sudo: bool = ...) -> _Result: ...
|
||||
def scan(self, hosts: Text = ..., ports: Text | None = ..., arguments: Text = ..., sudo: bool = ...) -> _Result: ...
|
||||
def analyse_nmap_xml_scan(
|
||||
self,
|
||||
nmap_xml_output: Optional[str] = ...,
|
||||
nmap_xml_output: str | None = ...,
|
||||
nmap_err: str = ...,
|
||||
nmap_err_keep_trace: str = ...,
|
||||
nmap_warn_keep_trace: str = ...,
|
||||
@@ -71,7 +71,7 @@ class PortScanner(object):
|
||||
def csv(self) -> str: ...
|
||||
|
||||
def __scan_progressive__(
|
||||
self: object, hosts: Text, ports: Text, arguments: Text, callback: Optional[_Callback], sudo: bool
|
||||
self: object, hosts: Text, ports: Text, arguments: Text, callback: _Callback | None, sudo: bool
|
||||
) -> None: ...
|
||||
|
||||
class PortScannerAsync(object):
|
||||
@@ -80,22 +80,22 @@ class PortScannerAsync(object):
|
||||
def scan(
|
||||
self,
|
||||
hosts: Text = ...,
|
||||
ports: Optional[Text] = ...,
|
||||
ports: Text | None = ...,
|
||||
arguments: Text = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
callback: _Callback | None = ...,
|
||||
sudo: bool = ...,
|
||||
) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def wait(self, timeout: Optional[int] = ...) -> None: ...
|
||||
def wait(self, timeout: int | None = ...) -> None: ...
|
||||
def still_scanning(self) -> bool: ...
|
||||
|
||||
class PortScannerYield(PortScannerAsync):
|
||||
def __init__(self) -> None: ...
|
||||
def scan( # type: ignore
|
||||
self, hosts: str = ..., ports: Optional[str] = ..., arguments: str = ..., sudo: bool = ...
|
||||
self, hosts: str = ..., ports: str | None = ..., arguments: str = ..., sudo: bool = ...
|
||||
) -> Iterator[Tuple[str, _Result]]: ...
|
||||
def stop(self) -> None: ...
|
||||
def wait(self, timeout: Optional[int] = ...) -> None: ...
|
||||
def wait(self, timeout: int | None = ...) -> None: ...
|
||||
def still_scanning(self) -> None: ... # type: ignore
|
||||
|
||||
class PortScannerHostDict(Dict[str, Any]):
|
||||
|
||||
Reference in New Issue
Block a user