mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 16:14:24 +08:00
Big diff: use lower-case list and dict (#5888)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, Dict, Iterable, Iterator, List, Text, Tuple, TypeVar
|
||||
from typing import Any, Callable, Dict, Iterable, Iterator, Text, Tuple, TypeVar
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
_T = TypeVar("_T")
|
||||
@@ -6,7 +6,7 @@ _Callback = Callable[[str, _Result], Any]
|
||||
|
||||
class _Result(TypedDict):
|
||||
nmap: _ResultNmap
|
||||
scan: Dict[str, PortScannerHostDict]
|
||||
scan: dict[str, PortScannerHostDict]
|
||||
|
||||
class _ResultNmap(TypedDict):
|
||||
command_line: str
|
||||
@@ -53,7 +53,7 @@ class PortScanner(object):
|
||||
def __init__(self, nmap_search_path: Iterable[str] = ...) -> None: ...
|
||||
def get_nmap_last_output(self) -> Text: ...
|
||||
def nmap_version(self) -> Tuple[int, int]: ...
|
||||
def listscan(self, hosts: str = ...) -> List[str]: ...
|
||||
def listscan(self, hosts: str = ...) -> list[str]: ...
|
||||
def scan(self, hosts: Text = ..., ports: Text | None = ..., arguments: Text = ..., sudo: bool = ...) -> _Result: ...
|
||||
def analyse_nmap_xml_scan(
|
||||
self,
|
||||
@@ -63,7 +63,7 @@ class PortScanner(object):
|
||||
nmap_warn_keep_trace: str = ...,
|
||||
) -> _Result: ...
|
||||
def __getitem__(self, host: Text) -> PortScannerHostDict: ...
|
||||
def all_hosts(self) -> List[str]: ...
|
||||
def all_hosts(self) -> list[str]: ...
|
||||
def command_line(self) -> str: ...
|
||||
def scaninfo(self) -> _ResultNmapInfo: ...
|
||||
def scanstats(self) -> _ResultNampStats: ...
|
||||
@@ -99,21 +99,21 @@ class PortScannerYield(PortScannerAsync):
|
||||
def still_scanning(self) -> None: ... # type: ignore
|
||||
|
||||
class PortScannerHostDict(Dict[str, Any]):
|
||||
def hostnames(self) -> List[_ResultHostNames]: ...
|
||||
def hostnames(self) -> list[_ResultHostNames]: ...
|
||||
def hostname(self) -> str: ...
|
||||
def state(self) -> str: ...
|
||||
def uptime(self) -> _ResulHostUptime: ...
|
||||
def all_protocols(self) -> List[str]: ...
|
||||
def all_tcp(self) -> List[int]: ...
|
||||
def all_protocols(self) -> list[str]: ...
|
||||
def all_tcp(self) -> list[int]: ...
|
||||
def has_tcp(self, port: int) -> bool: ...
|
||||
def tcp(self, port: int) -> _ResultHostPort: ...
|
||||
def all_udp(self) -> List[int]: ...
|
||||
def all_udp(self) -> list[int]: ...
|
||||
def has_udp(self, port: int) -> bool: ...
|
||||
def udp(self, port: int) -> _ResultHostPort: ...
|
||||
def all_ip(self) -> List[int]: ...
|
||||
def all_ip(self) -> list[int]: ...
|
||||
def has_ip(self, port: int) -> bool: ...
|
||||
def ip(self, port: int) -> _ResultHostPort: ...
|
||||
def all_sctp(self) -> List[int]: ...
|
||||
def all_sctp(self) -> list[int]: ...
|
||||
def has_sctp(self, port: int) -> bool: ...
|
||||
def sctp(self, port: int) -> _ResultHostPort: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user