Skip to content

Commit cfe0695

Browse files
authored
Change type hints with possible None args or return types to be annotated with Optional - includes commands in core.py and json commands (#3610)
* fix(redis-client): change `zrange` num parameter type to `Optional[int]` * fix(redis-client): normalize optional parameter annotations Replace all occurrences of Union[T, None] = None and bare T = None with Optional[T] = None in zrange, _zrange, arrtrim, and other methods so that type checkers no longer report errors. * commit message: fix(redis-client): normalize optional parameter annotations and correct arrtrim return type body: replaced all Union[T, None] = None and bare T = None with Optional[T] = None; changed arrtrim return annotation to Optional[int] * fix(redis-client): replace Optional[None] with Optional[int] for numeric parameters
1 parent a1f3cab commit cfe0695

File tree

3 files changed

+113
-112
lines changed

3 files changed

+113
-112
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,3 +1146,4 @@ incompatible in code using*SCAN commands loops such as
11461146
* Implemented STRLEN
11471147
* Implemented PERSIST
11481148
* Implemented SETRANGE
1149+
* Changed type annotation of the `num` parameter in `zrange` from `int` to `Optional[int]

0 commit comments

Comments
 (0)