redset
redset copied to clipboard
A Redis-backed sorted set useful for coordinating distributed work.
https://github.com/percolate/redset/blob/master/redset/locks.py#L60 Because self.timeout is evaluated as `timeout or 10`, if timeout is passed in as 0, 0 is a false-y value, and incorrectly gets set to 10.
- Used `@dataclass` decorator - Simplifies class definition with `automatic __init__` - Makes the class structure more declarative - Adds type hints for all attributes
Replaced `abc.ABCMeta` and object base class with the simpler `ABC` class from `abc` module Modern Python uses `ABC` instead of setting `metaclass` explicitly. No need to inherit from object in...