+ mypy --config-file mypy.ini graphistry
graphistry/feature_utils.py:39: error: Cannot assign to a type [misc]
graphistry/feature_utils.py:39: error: Incompatible types in assignment (expression has type "object", variable has type "Type[SentenceTransformer]") [assignment]
if TYPE_CHECKING:
MIXIN_BASE = ComputeMixin
try:
from sklearn.pipeline import Pipeline
except:
Pipeline = Any
try:
from sentence_transformers import SentenceTransformer
except:
SentenceTransformer = Any
try:
from dirty_cat import (
SuperVectorizer,
GapEncoder,
SimilarityEncoder,
)
except:
SuperVectorizer = Any
GapEncoder = Any
SimilarityEncoder = Any
try:
from sklearn.preprocessing import FunctionTransformer
from sklearn.base import BaseEstimator, TransformerMixin
except:
FunctionTransformer = Any
BaseEstimator = object
TransformerMixin = object
else:
MIXIN_BASE = object
Pipeline = Any
SentenceTransformer = Any
SuperVectorizer = Any
GapEncoder = Any
SimilarityEncoder = Any
FunctionTransformer = Any
BaseEstimator = Any
TransformerMixin = Any
@tanmoyio @mj3cheun @silkspace can one of you take?
Describe the bug
Regular PR fails on mypy analysis of feature_utils: https://github.com/graphistry/pygraphistry/actions/runs/9800176651/job/27061697437?pr=573
PyGraphistry API client environment
Additional context
=>
https://github.com/graphistry/pygraphistry/blob/53448d4ef153fd262466087a951bc28a44c8fadf/graphistry/feature_utils.py#L39
on
@tanmoyio @mj3cheun @silkspace can one of you take?