Open PeterHamfelt opened 3 months ago
@Pierre-Sassoulas Hi Pierre, Is there a way to set up the checker to only flag the use of pandas.DataFrame.bool for pandas versions 2.1.0 and lower? Since this feature is deprecated in 2.1.0, I want to make sure we're only alerting when it's truly relevant. Any insights on how to configure this, possibly through pylint-ml or another approach? Many checkers implemented into pylint-ml will be specific to a library and version.
I don't think this is something we do yet but detecting the version of a lib is possible. Maybe something to include in pylint 'core' once it's specified. (A specifier for the lib and version in 'msgs' dict and a check before raising/checking a message ?).
That sounds like a great addition. As you mentioned, I am interested in checking:
When creating a checker,
Could you create an enchantement issue in pylint with a design proposal, please ?
Yes, sure I can do that!
Return the bool of a single element Series or DataFrame. Deprecated since version 2.1.0: bool is deprecated and will be removed in future version of pandas. For Series use pandas.Series.item.
References https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.bool.html