Message ID | 20240502191205.3964106-1-lucas.demarchi@intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/2] Make upper non-optional in parse_int_range() | expand |
diff --git a/src/b4/__init__.py b/src/b4/__init__.py index aa65c43..b3f1c90 100644 --- a/src/b4/__init__.py +++ b/src/b4/__init__.py @@ -3541,7 +3541,7 @@ def make_quote(body: str, maxlines: int = 5) -> str: return '\n'.join(quotelines) -def parse_int_range(intrange: str, upper: Optional[int] = None) -> Iterator[int]: +def parse_int_range(intrange: str, upper: int) -> Iterator[int]: # Remove all whitespace intrange = re.sub(r'\s', '', intrange) for n in intrange.split(','):
All calls to parse_int_range() already pass the maximum value. This will be required if ranges are accepted to be negative, so prepare for that. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> --- src/b4/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)