Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -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]):