Skip to content

Commit

Permalink
__all__ needs to be strings
Browse files Browse the repository at this point in the history
  • Loading branch information
fgregg committed Dec 11, 2022
1 parent 0c7943e commit d2db6b0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
5 changes: 4 additions & 1 deletion dedupe/datamodel.py
Expand Up @@ -153,7 +153,10 @@ def typify_variables(
variable_definitions: Iterable[VariableDefinition],
) -> tuple[list[FieldVariable], list[Variable]]:

variable_types = {variable.type: variable for variable in dedupe.variables.__all__}
variable_types = {}
for variablename in dedupe.variables.__all__:
variable = getattr(dedupe.variables, variablename)
variable_types[variable.type] = variable

plugin_vars = load_setuptools_entrypoints("dedupevariables")
for var in plugin_vars:
Expand Down
22 changes: 11 additions & 11 deletions dedupe/variables/__init__.py
Expand Up @@ -10,15 +10,15 @@
from dedupe.variables.string import ShortStringType, StringType, TextType

__all__ = [
CustomType,
CategoricalType,
ExactType,
ExistsType,
InteractionType,
LatLongType,
PriceType,
SetType,
ShortStringType,
StringType,
TextType,
"CustomType",
"CategoricalType",
"ExactType",
"ExistsType",
"InteractionType",
"LatLongType",
"PriceType",
"SetType",
"ShortStringType",
"StringType",
"TextType",
]

0 comments on commit d2db6b0

Please sign in to comment.