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

E712 "true-false-comparison" incorrectly raises on array like #10344

Closed
tigerhawkvok opened this issue Mar 11, 2024 · 2 comments
Closed

E712 "true-false-comparison" incorrectly raises on array like #10344

tigerhawkvok opened this issue Mar 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@tigerhawkvok
Copy link

Consider

import pandas as pd
s = pd.Series([True, True, False, False, None, None])
filter = s != False # [True, True, False, False, True, True]
notAFilter = s is not False # True

or similar operations on array-likes. Here, E712 is very much not equivalent, and in fact, wrong.

This may not be tractable as it requires type analysis.

@charliermarsh
Copy link
Member

Thanks! I think this is the same as this open issue: #4560.

@charliermarsh charliermarsh closed this as not planned Won't fix, can't repro, duplicate, stale Mar 11, 2024
@charliermarsh
Copy link
Member

(Closing to merge / consolidate into #4560.)

@charliermarsh charliermarsh added the bug Something isn't working label Mar 11, 2024
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

No branches or pull requests

2 participants