Skip to content

Commit a0d5734

Browse files
Copilotdobairoland
andcommitted
Update type annotation for parse_port_filters to reflect runtime behavior
Co-authored-by: dobairoland <[email protected]>
1 parent a1bedf0 commit a0d5734

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

esptool/cli_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from esptool.cmds import detect_flash_size
1010
from esptool.util import FatalError, flash_size_bytes, strip_chip_name
1111
from esptool.logger import log
12-
from typing import IO, Any
12+
from typing import IO, Any, Union
1313

1414
################################ Custom types #################################
1515

@@ -379,7 +379,7 @@ def arg_auto_int(x: str) -> int:
379379

380380

381381
def parse_port_filters(
382-
value: list[str],
382+
value: Union[list[str], tuple[str, ...]],
383383
) -> tuple[list[int], list[int], list[str], list[str]]:
384384
"""Parse port filter arguments into separate lists for each filter type"""
385385
# Handle malformed input from OptionEatAll which can pass tuple with string representation

0 commit comments

Comments
 (0)