Skip to content

CLN: Use is operator for comparing with None (Pep8) #11828

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
merged 1 commit into from
Dec 15, 2015
Merged

CLN: Use is operator for comparing with None (Pep8) #11828

merged 1 commit into from
Dec 15, 2015

Conversation

proinsias
Copy link
Contributor

No description provided.

@@ -293,15 +293,15 @@ def test_none_comparison(self):

o[0] = np.nan

result = o == None
result = o is None
Copy link
Contributor

Choose a reason for hiding this comment

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

these all need to be left alone, these are explicity testing ==

@jreback jreback added the Clean label Dec 12, 2015
@proinsias
Copy link
Contributor Author

I've reverted the changes to that file.
Btw, is it kosher to add comments like PyCharm's "# noinspection PyComparisonWithNone" to specifically try to avoid newbies like me from thinking there's an error there?

@jreback
Copy link
Contributor

jreback commented Dec 15, 2015

@proinsias yes having a comment is ok to prevent linters from finding this is fine

@jreback
Copy link
Contributor

jreback commented Dec 15, 2015

ping when updated

@jreback jreback added this to the 0.18.0 milestone Dec 15, 2015
@proinsias
Copy link
Contributor Author

I've updated the pull request to avoid modifying the test code, and to add #noinspection comments in the test code.

jreback added a commit that referenced this pull request Dec 15, 2015
CLN: Use `is` operator for comparing with `None` (Pep8)
@jreback jreback merged commit 471b7c7 into pandas-dev:master Dec 15, 2015
@jreback
Copy link
Contributor

jreback commented Dec 15, 2015

thanks!

@proinsias proinsias deleted the use_is_or_is_not branch December 15, 2015 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants