Big diff: use lower-case list and dict (#5888)

This commit is contained in:
Akuli
2021-08-08 19:26:35 +03:00
committed by GitHub
parent 11f54c3407
commit ce11072dbe
325 changed files with 2196 additions and 2334 deletions

View File

@@ -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: ...