Skip to content

Commit

Permalink
Merge pull request #1642 from mabel-dev/HOUSEKEEPING/4
Browse files Browse the repository at this point in the history
Housekeeping/4
  • Loading branch information
joocer authored May 6, 2024
2 parents 37d22dc + 423979f commit dbe37ef
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion opteryx/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__build__ = 484
__build__ = 486

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions opteryx/managers/schemes/mabel_partitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ def _inner(*, timestamp):
raise UnsupportedSegementationError(dataset=prefix, segments=segments)

as_at = None
as_ats = sorted(as_ats)
as_at_list = sorted(as_ats)

# Keep popping from as_ats until a valid frame is found
while as_ats:
as_at = as_ats.pop()
while as_at_list:
as_at = as_at_list.pop()
if as_at is None:
continue
if is_complete_and_not_invalid(control_blobs, as_at):
Expand Down
2 changes: 1 addition & 1 deletion opteryx/operators/async_read_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def to_dict(self) -> dict: # pragma: no cover
raise NotImplementedError()

@classmethod
def from_dict(cls, dic: dict) -> "BasePlanNode": # pragma: no cover
def from_dict(cls, dic: dict) -> "AsyncReaderNode": # pragma: no cover
raise NotImplementedError()

def execute(self) -> Generator:
Expand Down
3 changes: 3 additions & 0 deletions opteryx/operators/base_plan_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ def from_dict(cls, dic: dict) -> "BasePlanNode": # pragma: no cover
def set_producers(self, producers):
self._producers = producers

def config(self) -> str:
return ""

@property
def name(self): # pragma: no cover
"""
Expand Down
4 changes: 2 additions & 2 deletions opteryx/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@


from itertools import permutations
from typing import List
from typing import Iterable
from typing import Optional

from opteryx.third_party.mbleven import compare


def suggest_alternative(value: str, candidates: List[str]) -> Optional[str]:
def suggest_alternative(value: str, candidates: Iterable[str]) -> Optional[str]:
"""
Find closest match using a variation of Levenshtein Distance with additional
handling for rearranging function name parts.
Expand Down

0 comments on commit dbe37ef

Please sign in to comment.