FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add `self` param to array object properties by IsaacBreen · Pull Request #464 · data-apis/array-api · GitHub

Add self param to array object properties - #464

Merged
rgommers merged 1 commit into
data-apis:mainfrom
IsaacBreen:patch-1
Jul 27, 2022
Merged

Add self param to array object properties#464
rgommers merged 1 commit into
data-apis:mainfrom
IsaacBreen:patch-1

Conversation

Copy link
Copy Markdown
Contributor

No description provided.

leofang commented Jul 18, 2022

Copy link
Copy Markdown
Contributor

I am not typing expert but I think we need TypeVar(T, bound='array') now (PEP 484), and in the future Self (PEP 673). The current approach would not work for subclasses. My vote would go for the status quo (no type hint for self) but let's wait for others to chime in.

Copy link
Copy Markdown
Member

array is what the other methods use so keeping that here is fine. We can open another issue about using a different type hint for self.

Copy link
Copy Markdown
Member

CI failure is unrelated, let's retry that.

rgommers closed this Jul 27, 2022
rgommers reopened this Jul 27, 2022

leofang commented Jul 27, 2022

Copy link
Copy Markdown
Contributor

Sorry, so this PR does two things:

  1. It fixes the missing self to the array methods (which I overlooked)
  2. It adds a type hint for self

We can open another issue about using a different type hint for self.

Let's do that.

Copy link
Copy Markdown
Member

Okay, CI is unrelated, I'll open a separate issue for that too.

leofang commented Jul 27, 2022

Copy link
Copy Markdown
Contributor

Yeah the CI failure is likely a permission issue that we also hit before.

Copy link
Copy Markdown
Member

The type hint for self is one instance of a general pattern; same as for scalars we use int and not anything that ducktypes with int (which can be type-able by SupportsInt or some such thing).

rgommers added the bug Something isn't working. label Jul 27, 2022

rgommers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

So it looks like we're happy here, in it goes.

rgommers merged commit bc49588 into data-apis:main Jul 27, 2022
kgryte added this to the v2022 milestone Dec 15, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL