Skip to content

Commit

Permalink
fix hasattr
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbachmann committed Nov 1, 2023
1 parent 7ee759a commit 2119834
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Levenshtein/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,15 @@ def jaro_winkler(
jaro._RF_ScorerPy = _Jaro.similarity._RF_ScorerPy
jaro_winkler._RF_ScorerPy = _JaroWinkler.similarity._RF_ScorerPy

if hasattr("_RF_Scorer", _Levenshtein.distance):
if hasattr(_Levenshtein.distance, "_RF_Scorer"):
distance._RF_Scorer = _Levenshtein.distance._RF_Scorer
if hasattr("_RF_Scorer", _Indel.normalized_similarity):
if hasattr(_Indel.normalized_similarity, "_RF_Scorer"):
ratio._RF_Scorer = _Indel.normalized_similarity._RF_Scorer
if hasattr("_RF_Scorer", _Hamming.distance):
if hasattr(_Hamming.distance, "_RF_Scorer"):
hamming._RF_Scorer = _Hamming.distance._RF_Scorer
if hasattr("_RF_Scorer", _Jaro.similarity):
if hasattr(_Jaro.similarity, "_RF_Scorer"):
jaro._RF_Scorer = _Jaro.similarity._RF_Scorer
if hasattr("_RF_Scorer", _JaroWinkler.similarity):
if hasattr(_JaroWinkler.similarity, "_RF_Scorer"):
jaro_winkler._RF_Scorer = _JaroWinkler.similarity._RF_Scorer


Expand Down

0 comments on commit 2119834

Please sign in to comment.