Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TYP: genericStringDType#28856

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
charris merged 3 commits intonumpy:mainfromjorenham:numtype/335
May 1, 2025
Merged

TYP: genericStringDType#28856

charris merged 3 commits intonumpy:mainfromjorenham:numtype/335
May 1, 2025

Conversation

@jorenham
Copy link
Member

ported fromnumpy/numtype#335


This also adds the missingna_object andcoerce kwargs toStringDType.__new__

@jorenhamjorenham added the 56 - Needs Release Note.Needs an entry in doc/release/upcoming_changes labelApr 28, 2025
@jorenhamjorenham added this to the2.3.0 release milestoneApr 28, 2025
@jorenhamjorenham added 41 - Static typing numtypeIsssue/PR related to numpy/numtype labelsApr 28, 2025
@jorenhamjorenham marked this pull request as ready for reviewApril 28, 2025 20:37
@jorenhamjorenham removed the 56 - Needs Release Note.Needs an entry in doc/release/upcoming_changes labelApr 28, 2025
@ngoldbaumngoldbaum self-assigned thisApr 29, 2025
@ngoldbaumngoldbaum added the component: numpy.stringsString dtypes and functions labelApr 29, 2025
Copy link
Member

@ngoldbaumngoldbaum left a comment

Choose a reason for hiding this comment

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

Probably needs some new typing tests too?

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
@jorenham
Copy link
MemberAuthor

Probably needs some new typing tests too?

It's all pretty straightforward so I didn't think it would be necessary to add additional tests for this. I figured that as long as the current type-tests involvingStringDType still pass, then it's fine. Mypy primer also shows no diff.

Testing this would also be rather difficult because it involvestyping.Never. If you'd do something likeassert_type(StringDType().na_object, typing.Never), then mypy doesn't analyze anything that comes after that statement, because it assumes that accessingna_object: typing.Never will raise an exception. It's possible to work around that by wrapping it in a function, but it'd be a lot of effort for a rather trivial annotation.

But if you want to see some test either way, I won't mind adding some 🤷🏻

@ngoldbaum
Copy link
Member

But if you want to see some test either way, I won't mind adding some 🤷🏻

Eh, no worries.

@charrischarris merged commit01f2fec intonumpy:mainMay 1, 2025
75 checks passed
@charris
Copy link
Member

Thanks Joren.

jorenham reacted with thumbs up emoji

@jorenhamjorenham deleted the numtype/335 branchMay 1, 2025 18:26
MaanasArora pushed a commit to MaanasArora/numpy that referenced this pull requestMay 8, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ngoldbaumngoldbaumngoldbaum approved these changes

Assignees

@ngoldbaumngoldbaum

Labels

41 - Static typingcomponent: numpy.stringsString dtypes and functionsnumtypeIsssue/PR related to numpy/numtype

Projects

None yet

Milestone

2.3.0 release

Development

Successfully merging this pull request may close these issues.

3 participants

@jorenham@ngoldbaum@charris

[8]ページ先頭

©2009-2025 Movatter.jp