Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Add annotations for np.broadcast and np.DataSource #19002

Merged
merged 3 commits into from
May 17, 2021

Conversation

BvB93
Copy link
Member

@BvB93 BvB93 commented May 13, 2021

Per the title, this PR adds annotations for the np.broadcast and np.DataSource classes.

destpath: Union[None, str, os.PathLike[str]] = ...,
) -> None: ...
def __del__(self) -> None: ...
def abspath(self, path: str) -> str: ...
Copy link
Member Author

Choose a reason for hiding this comment

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

It might be worthwhile to add support for the __fspath__ protocol at some point,
so one can also pass the likes of pathlib.Path.

@charris
Copy link
Member

charris commented May 17, 2021

Not sure that DataSource is a public function, but this won't hurt.

@charris charris merged commit acd2914 into numpy:main May 17, 2021
@charris
Copy link
Member

charris commented May 17, 2021

Thanks Bas.

@BvB93 BvB93 deleted the datasource branch May 17, 2021 18:50
@BvB93
Copy link
Member Author

BvB93 commented May 17, 2021

It seems to be documented, so I think so?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants