Show More
@@ -39,9 +39,22 b' cmdtable = {}' | |||||
39 | command = registrar.command(cmdtable) |
|
39 | command = registrar.command(cmdtable) | |
40 |
|
40 | |||
41 | try: |
|
41 | try: | |
42 | import fuzzywuzzy.fuzz as fuzz |
|
42 | # Silence a warning about python-Levenshtein. | |
|
43 | # | |||
|
44 | # We don't need the the performance that much and it get anoying in tests. | |||
|
45 | import warnings | |||
43 |
|
46 | |||
44 | fuzz.token_set_ratio |
|
47 | with warnings.catch_warnings(): | |
|
48 | warnings.filterwarnings( | |||
|
49 | action="ignore", | |||
|
50 | message=".*python-Levenshtein.*", | |||
|
51 | category=UserWarning, | |||
|
52 | module="fuzzywuzzy.fuzz", | |||
|
53 | ) | |||
|
54 | ||||
|
55 | import fuzzywuzzy.fuzz as fuzz | |||
|
56 | ||||
|
57 | fuzz.token_set_ratio | |||
45 | except ImportError: |
|
58 | except ImportError: | |
46 | fuzz = None |
|
59 | fuzz = None | |
47 |
|
60 |
General Comments 0
You need to be logged in to leave comments.
Login now