microsoft / python-type-stubs

A set of type stubs for popular Python packages. These are works in progress from the Microsoft Python team and others, with the intent that they are contributed to typeshed or to the associated packages once sufficiently complete.
MIT License
251 stars 99 forks source link

Add stubs for RMSE and RMSLE in sklearn.metrics #317

Closed einarwar closed 2 months ago

einarwar commented 2 months ago

Updates sklearn.metrics stubs with changes introduced in v1.4 in https://github.com/scikit-learn/scikit-learn/pull/26734

Originally wanted to mark old function parameters are deprecated, but i guess that isn't possible until PEP702

Related issue from pylance: https://github.com/microsoft/pylance-release/issues/6410

einarwar commented 2 months ago

@microsoft-github-policy-service agree

debonte commented 2 months ago

Originally wanted to mark old function parameters are deprecated, but i guess that isn't possible until PEP702

That sounds good to me! deprecated() is available to Python 3.12 and below via the typing_extensions module. See https://peps.python.org/pep-0702/#backwards-compatibility.

I took the liberty of making this change in your branch.

debonte commented 2 months ago

Thanks for your contribution @einarwar!