redis-om-python
redis-om-python copied to clipboard
[WIP] codebase refactor.
The following steps were performed:
- Removed unnecessary
keys
method call. - Replaced the
filter
method with a list comprehension to increase readability. - ~~Replaced old python2 methods with their equivalent in python3 (e.g.
xrange
->range
,izip
->zip
)~~ didn't notice the use ofsix
module. - Used
f-strings
whenever possible because it is the ultimate method for string formatting. - Removed unnecessary list syntax from the
sorted
method because it takes aniterable
which is in this case a generator. - Removed unnecessary boolean literals.
- ~~Found and fixed a syntax error:
typ is not str
->not isinstance(typ, str)
~~. - Replaced
None not in
withall
.
Question: Why the cache size is set to None? This can become problematic as explained here.