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/pull/7044#issuecomment-1256562539,https://api.github.com/repos/pydata/xarray/issues/7044,1256562539,IC_kwDOAMm_X85K5Z9r,14371165,2022-09-23T18:56:03Z,2022-09-23T18:56:40Z,MEMBER,My idea was to live with `Any` since we'll be able to use it via `typing_extensions` once mypy starts supporting Self as well.,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1376095009 https://github.com/pydata/xarray/pull/7044#issuecomment-1256546302,https://api.github.com/repos/pydata/xarray/issues/7044,1256546302,IC_kwDOAMm_X85K5V_-,43316012,2022-09-23T18:38:58Z,2022-09-23T18:38:58Z,COLLABORATOR,"Ok, so then we have to either a) type self or b) live with return Any until minimum python version is 3.11?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1376095009 https://github.com/pydata/xarray/pull/7044#issuecomment-1256541081,https://api.github.com/repos/pydata/xarray/issues/7044,1256541081,IC_kwDOAMm_X85K5UuZ,14371165,2022-09-23T18:32:25Z,2022-09-23T18:34:16Z,MEMBER,"The intention in https://peps.python.org/pep-0673/ is to not need to type self. Which pyright handles correctly. So this has to be valid: ```python if TYPE_CHECKING: from xarray.core.types import Self class Foo: def returns_self(self) -> Self: return self ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1376095009 https://github.com/pydata/xarray/pull/7044#issuecomment-1256379239,https://api.github.com/repos/pydata/xarray/issues/7044,1256379239,IC_kwDOAMm_X85K4tNn,43316012,2022-09-23T15:47:07Z,2022-09-23T15:47:07Z,COLLABORATOR,"Thinking about it a bit more... Not sure why you got such errors. Did you forget to annotate ""self""? i.e. ``` def func(self: Self, x: Any) -> Self ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1376095009 https://github.com/pydata/xarray/pull/7044#issuecomment-1249510769,https://api.github.com/repos/pydata/xarray/issues/7044,1249510769,IC_kwDOAMm_X85KegVx,43316012,2022-09-16T15:34:08Z,2022-09-16T15:34:17Z,COLLABORATOR,"> @headtr1ck `TypeVar` seems to restrict a little, because I got errors when using `Self` with facetgrids in #6778: > `C:\users\j.w\documents\github\xarray\xarray\plot\facetgrid.py:462: error: Incompatible return value type (got ""FacetGrid"", expected ""Self"")` Interesting. I'm ok with changing it back to Any for now :)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1376095009 https://github.com/pydata/xarray/pull/7044#issuecomment-1249504258,https://api.github.com/repos/pydata/xarray/issues/7044,1249504258,IC_kwDOAMm_X85KeewC,14371165,2022-09-16T15:27:43Z,2022-09-16T15:27:43Z,MEMBER,"@headtr1ck `TypeVar` seems to restrict a little, because I got errors when using `Self` with facetgrids in #6778: `C:\users\j.w\documents\github\xarray\xarray\plot\facetgrid.py:462: error: Incompatible return value type (got ""FacetGrid"", expected ""Self"")`","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1376095009