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

PYTHON-5514 Specific assertions for "is" and "is not None" #2502

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

Merged
sleepyStick merged 2 commits into mongodb:master from sleepyStick:PYTHON-5514
Aug 25, 2025

Conversation

Copy link
Contributor

@sleepyStick sleepyStick commented Aug 22, 2025

(grouped them together because there wasn't a lot of each, but i can seperate the two into two different PRs if that's preferred)

self.assertTrue(x is y) -> self.assertIs(x, y)
self.assertTrue(x is not None) -> self.assertIsNotNone(x)

@sleepyStick sleepyStick marked this pull request as ready for review August 22, 2025 19:03
@sleepyStick sleepyStick requested a review from a team as a code owner August 22, 2025 19:03
Copy link
Contributor

@aclark4life aclark4life left a comment

Choose a reason for hiding this comment

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

LGTM! The only minor issue (nit, even) I notice is that "better" is subjective and what's actually changing is the assertions, from general (True/False) to specific (Is/IsNot) and that is objectively better 😂

sleepyStick reacted with heart emoji
@aclark4life aclark4life changed the title (削除) PYTHON-5514 Better assertions for "is" and "is not None" (削除ここまで) (追記) PYTHON-5514 Specific assertions for "is" and "is not None" (追記ここまで) Aug 25, 2025
Copy link
Contributor Author

LGTM! The only minor issue (nit, even) I notice is that "better" is subjective and what's actually changing is the assertions, from general (True/False) to specific (Is/IsNot) and that is objectively better 😂

Good point! thanks for the name change!

@sleepyStick sleepyStick merged commit 3ebd934 into mongodb:master Aug 25, 2025
79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@aclark4life aclark4life aclark4life approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /