From f5e75d49a82f2d58d6058da7bc39a734e5c774f3 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Sat, 14 Nov 2026 11:07:58 -0600 Subject: [PATCH] Preserve text and byte nmap scan output types --- stubs/python-nmap/nmap/nmap.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stubs/python-nmap/nmap/nmap.pyi b/stubs/python-nmap/nmap/nmap.pyi index 740467d72e55..5ad0614d10dc 100644 --- a/stubs/python-nmap/nmap/nmap.pyi +++ b/stubs/python-nmap/nmap/nmap.pyi @@ -64,7 +64,7 @@ class PortScanner: 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 get_nmap_last_output(self) -> str | bytes: ... def nmap_version(self) -> tuple[int, int]: ... def listscan(self, hosts: str = "127.0.0.1") -> list[str]: ... def scan( @@ -72,7 +72,7 @@ class PortScanner: ) -> _Result: ... def analyse_nmap_xml_scan( self, - nmap_xml_output: str | None = None, + nmap_xml_output: str | bytes | None = None, nmap_err: str = "", nmap_err_keep_trace: str = "", nmap_warn_keep_trace: str = "",