Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zmbc committed Dec 7, 2024
1 parent 20c7e54 commit 0dec989
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
5 changes: 4 additions & 1 deletion splink/internals/comparison_level_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,10 @@ def create_sql(self, sql_dialect: SplinkDialect) -> str:
)
)
),
pair -> {distance_function_name_transpiled}(pair[{sql_dialect.array_first_index}], pair[{sql_dialect.array_first_index + 1}])
pair -> {distance_function_name_transpiled}(
pair[{sql_dialect.array_first_index}],
pair[{sql_dialect.array_first_index + 1}]
)
)
) {self._comparator()} {self.distance_threshold}"""

Expand Down
30 changes: 14 additions & 16 deletions splink/internals/dialects.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,28 +108,26 @@ def cosine_similarity_function_name(self):
f"Backend '{self.sql_dialect_str}' does not have a "
"'Cosine Similarity' function"
)

@property
def array_max_function_name(self):
raise NotImplementedError(
f"Backend '{self.sql_dialect_str}' does not have an "
"'Array max' function"
f"Backend '{self.sql_dialect_str}' does not have an 'Array max' function"
)

@property
def array_min_function_name(self):
raise NotImplementedError(
f"Backend '{self.sql_dialect_str}' does not have an "
"'Array min' function"
f"Backend '{self.sql_dialect_str}' does not have an 'Array min' function"
)

@property
def array_transform_function_name(self):
raise NotImplementedError(
f"Backend '{self.sql_dialect_str}' does not have an "
"'Array transform' function"
)

@property
def array_first_index(self):
raise NotImplementedError(
Expand Down Expand Up @@ -229,19 +227,19 @@ def jaro_winkler_function_name(self):
@property
def jaccard_function_name(self):
return "jaccard"

@property
def array_max_function_name(self):
return "list_max"

@property
def array_min_function_name(self):
return "list_min"

@property
def array_transform_function_name(self):
return "list_transform"

@property
def array_first_index(self):
return 1
Expand Down Expand Up @@ -344,19 +342,19 @@ def jaro_winkler_function_name(self):
@property
def jaccard_function_name(self):
return "jaccard"

@property
def array_max_function_name(self):
return "array_max"

@property
def array_min_function_name(self):
return "array_min"

@property
def array_transform_function_name(self):
return "transform"

@property
def array_first_index(self):
return 0
Expand Down

0 comments on commit 0dec989

Please sign in to comment.