Skip to content

Commit

Permalink
fix:flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Dec 3, 2023
1 parent cdbe45a commit f341cdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fakeredis/commands_mixins/set_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def smove(self, src: CommandItem, dst: CommandItem, member: bytes) -> int:
return 1

@command((Key(set),), (Int,))
def spop(self, key: CommandItem, count=None) -> Optional[bytes]:
def spop(self, key: CommandItem, count: Optional[int] = None) -> Optional[bytes]:
if count is None:
if not key.value:
return None
Expand Down
4 changes: 2 additions & 2 deletions fakeredis/geo/geohash.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def decode(geohash: str) -> Tuple[float, float, float, float]:
return lat, lon, lat_err, lon_err


def encode(latitude: float, longitude: float, precision:int=12) -> str:
def encode(latitude: float, longitude: float, precision: int = 12) -> str:
"""
Encode a position given in float arguments latitude, longitude to
a geohash which will have the character count precision.
Expand All @@ -62,7 +62,7 @@ def encode(latitude: float, longitude: float, precision:int=12) -> str:
is_longitude = True

def next_interval(
curr: float, interval: Tuple[float, float], ch: int
curr: float, interval: Tuple[float, float], ch: int
) -> Tuple[Tuple[float, float], int]:
mid = (interval[0] + interval[1]) / 2
if curr > mid:
Expand Down

0 comments on commit f341cdd

Please sign in to comment.