home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1211288085

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/5531#issuecomment-1211288085 https://api.github.com/repos/pydata/xarray/issues/5531 1211288085 IC_kwDOAMm_X85IMsoV 10194086 2022-08-10T21:20:32Z 2022-08-10T21:20:32Z MEMBER

I just discovered the scikit-learns decorator to deprecate positional args - see https://github.com/scikit-learn/scikit-learn/pull/13311 - and now have a preference for this one. It seems the simplest and does not need any input as it reads the keyword-only args from the signature (could potentially add the version of the deprecation).

python @_deprecate_positional_args def f1(a, b, *, c=1, d=1): pass

and at the end of the deprecation period you only need to do

diff -@_deprecate_positional_args def f1(a, b, *, c=1, d=1): pass

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  929840699
Powered by Datasette · Queries took 0.725ms · About: xarray-datasette