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

Pylint thinks sklearn.metrics.log_loss returns a tuple #1497

Open
sam-s opened this issue May 24, 2017 · 5 comments
Open

Pylint thinks sklearn.metrics.log_loss returns a tuple #1497

sam-s opened this issue May 24, 2017 · 5 comments
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code Lib specific 💅 This affect the code from a particular library Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) Needs PR This issue is accepted, sufficiently specified and now needs an implementation

Comments

@sam-s
Copy link

sam-s commented May 24, 2017

Steps to reproduce

  1. create file with
import sklearn.metrics
foo = sklearn.metrics.log_loss(...)
bar = - foo
  1. Run it through pylint

Current behavior

 (E1130, invalid-unary-operand-type, myfile) bad operand type for unary -: tuple

Expected behavior

no errors, no warnings

pylint --version output

pylint 1.7.1, 
astroid 1.5.2
Python 2.7.13 (default, Dec 18 2016, 07:03:39) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
@sam-s
Copy link
Author

sam-s commented May 17, 2018

Same problem with

pylint 1.8.4, 
astroid 1.6.3
Python 3.6.5 (default, Mar 30 2018, 06:41:53) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]

@albertzang
Copy link

Same problem here

pylint 1.9.1, 
astroid 1.6.4
Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]

@sam-s
Copy link
Author

sam-s commented Jul 13, 2018

Same problem with

pylint 2.0.0.dev2
astroid 2.0.0.dev3
Python 3.7.0 (default, Jun 29 2018, 20:13:13) 
[Clang 9.1.0 (clang-902.0.39.2)]

@PCManticore
Copy link
Contributor

The issue has not been closed yet, so this problem is still here on all versions until the issue gets closed.

@sam-s
Copy link
Author

sam-s commented Sep 27, 2021

still with

pylint 2.11.1
astroid 2.8.0
Python 3.9.7 (default, Sep  3 2021, 12:45:31) 
[Clang 12.0.0 (clang-1200.0.32.29)]

@Pierre-Sassoulas Pierre-Sassoulas added Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) Lib specific 💅 This affect the code from a particular library Needs PR This issue is accepted, sufficiently specified and now needs an implementation False Positive 🦟 A message is emitted but nothing is wrong with the code and removed Bug 🪲 labels Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code Lib specific 💅 This affect the code from a particular library Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Projects
None yet
Development

No branches or pull requests

4 participants