Repository: dedupeio/dedupe

Issue:
ExistsType subclasses CategoricalType which requires categories
I've tried to use the new syntax for field definitions and encountered a potential bug:

`dedupe.variables.Exists("first_name")`
doesn't work as stated in the Variable-definition.rst

The following error occurs:
> TypeError: CategoricalType.__init__() missing 1 required positional argument: 'categories'

due to `super().__init__(field, **kwargs)` referencing `CategoricalType`.

There might be different options to tackle this. As far as I've understood, it should be sufficient to hardcode 
`categories=[0, 1]` as kwarg.

Discussion:

Patch:
diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml
index 634a970..ccbdd62 100644
--- a/.github/workflows/pythonpackage.yml
+++ b/.github/workflows/pythonpackage.yml
@@ -50,7 +50,7 @@ jobs:
     - name: pytest
       run: pytest
     - name: Code Coverage
-      uses: codecov/codecov-action@v4
+      uses: codecov/codecov-action@v3
       env:
         OS: ${{ matrix.os }}
         PYTHON: '3.7'
diff --git a/dedupe/variables/exists.py b/dedupe/variables/exists.py
index 00ca7eb..7288725 100644
--- a/dedupe/variables/exists.py
+++ b/dedupe/variables/exists.py
@@ -5,11 +5,10 @@ from typing import Any
 from categorical import CategoricalComparator
 
 from dedupe._typing import PredicateFunction
-from dedupe.variables.base import DerivedType
-from dedupe.variables.categorical_type import CategoricalType
+from dedupe.variables.base import DerivedType, FieldType
 
 
-class ExistsType(CategoricalType):
+class ExistsType(FieldType):
     type = "Exists"
     _predicate_functions: list[PredicateFunction] = []
 


Test patch:
diff --git a/tests/test_exists.py b/tests/test_exists.py
new file mode 100644
index 0000000..f4129ef
--- /dev/null
+++ b/tests/test_exists.py
@@ -0,0 +1,13 @@
+import unittest
+
+import numpy
+
+from dedupe.variables.exists import ExistsType
+
+
+class TestExists(unittest.TestCase):
+    def test_comparator(self):
+        var = ExistsType("foo")
+        assert numpy.array_equal(var.comparator(None, None), [0, 0])
+        assert numpy.array_equal(var.comparator(1, 1), [1, 0])
+        assert numpy.array_equal(var.comparator(1, 0), [0, 1])