home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 1068680815 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 3

  • Illviljan 3
  • max-sixty 2
  • antscloud 1

author_association 2

  • MEMBER 5
  • CONTRIBUTOR 1

issue 1

  • Fix wrong typing for tolerance in reindex · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1013720993 https://github.com/pydata/xarray/pull/6037#issuecomment-1013720993 https://api.github.com/repos/pydata/xarray/issues/6037 IC_kwDOAMm_X848bCeh max-sixty 5635139 2022-01-15T17:28:08Z 2022-01-15T17:28:08Z MEMBER

Thank you @antscloud !

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
  Fix wrong typing for tolerance in reindex 1068680815
1013689588 https://github.com/pydata/xarray/pull/6037#issuecomment-1013689588 https://api.github.com/repos/pydata/xarray/issues/6037 IC_kwDOAMm_X848a6z0 Illviljan 14371165 2022-01-15T14:16:00Z 2022-01-15T14:16:00Z MEMBER

Number is apparently a no-go for int and float when type checking.

For a future PR, but I don't think .sel is being type-checked properly in tests either as it uses Number as well: https://github.com/pydata/xarray/blob/4c865d607e6e03605b7050d9fb6991e86346bf08/xarray/core/dataset.py#L2446

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix wrong typing for tolerance in reindex 1068680815
1013669587 https://github.com/pydata/xarray/pull/6037#issuecomment-1013669587 https://api.github.com/repos/pydata/xarray/issues/6037 IC_kwDOAMm_X848a17T Illviljan 14371165 2022-01-15T11:57:18Z 2022-01-15T11:57:18Z MEMBER

Some typing errors now pop up now, now that we're testing it. Probably easier to use int and float instead? xarray/tests/test_dataarray.py:1534: error: Argument "tolerance" to "reindex" of "DataArray" has incompatible type "float"; expected "Union[Number, Iterable[Number], None]" [arg-type] xarray/tests/test_dataarray.py:1538: error: List item 0 has incompatible type "float"; expected "Number" [list-item] xarray/tests/test_dataarray.py:1538: error: List item 1 has incompatible type "float"; expected "Number" [list-item] xarray/tests/test_dataarray.py:1538: error: List item 2 has incompatible type "float"; expected "Number" [list-item] xarray/tests/test_dataset.py:1893: error: Argument "tolerance" to "reindex" of "Dataset" has incompatible type "float"; expected "Union[Number, Iterable[Number], None]" [arg-type] xarray/tests/test_dataset.py:1897: error: List item 0 has incompatible type "float"; expected "Number" [list-item] xarray/tests/test_dataset.py:1897: error: List item 1 has incompatible type "float"; expected "Number" [list-item] xarray/tests/test_dataset.py:1897: error: List item 2 has incompatible type "float"; expected "Number" [list-item] xarray/tests/test_dataset.py:1901: error: List item 0 has incompatible type "int"; expected "Number" [list-item] xarray/tests/test_dataset.py:1901: error: List item 1 has incompatible type "float"; expected "Number" [list-item] xarray/tests/test_dataset.py:1901: error: List item 2 has incompatible type "int"; expected "Number" [list-item]

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix wrong typing for tolerance in reindex 1068680815
1006718772 https://github.com/pydata/xarray/pull/6037#issuecomment-1006718772 https://api.github.com/repos/pydata/xarray/issues/6037 IC_kwDOAMm_X848AU80 Illviljan 14371165 2022-01-06T16:18:53Z 2022-01-06T16:18:53Z MEMBER

python def test_reindex_method(self) -> None: Should do the trick.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix wrong typing for tolerance in reindex 1068680815
1006701763 https://github.com/pydata/xarray/pull/6037#issuecomment-1006701763 https://api.github.com/repos/pydata/xarray/issues/6037 IC_kwDOAMm_X848AQzD antscloud 57914115 2022-01-06T15:56:24Z 2022-01-06T15:56:24Z CONTRIBUTOR

Thank you too for your patience @max-sixty I don't understand where to put the -> None In the test function ? https://github.com/pydata/xarray/blob/118a00b1233db34fe90072ed2e21501337b04b35/xarray/tests/test_dataset.py#L1886

How does mypy can test these types ?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix wrong typing for tolerance in reindex 1068680815
1000497595 https://github.com/pydata/xarray/pull/6037#issuecomment-1000497595 https://api.github.com/repos/pydata/xarray/issues/6037 IC_kwDOAMm_X847omG7 max-sixty 5635139 2021-12-23T19:52:54Z 2021-12-23T19:52:54Z MEMBER

Thanks a lot!

On the relevant test, could we please add -> None to the def? That will cause mypy to use the test to check the types.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix wrong typing for tolerance in reindex 1068680815

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 3357.314ms · About: xarray-datasette