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

False-positive E1101 with tensorflow.Summary().value #2024

Open
bersbersbers opened this issue Apr 19, 2018 · 1 comment
Open

False-positive E1101 with tensorflow.Summary().value #2024

bersbersbers opened this issue Apr 19, 2018 · 1 comment
Labels
Bug 🪲 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

@bersbersbers
Copy link

This is slightly different than #2021: it raises the same error, but this time, the type of the variable appears to be correct. I myself wonder how this code runs without error, but it does. (This is where I got it from: keras-team/keras#6692 (comment))

Steps to reproduce

>cat bug.py
"""Code runs without error"""
import tensorflow as tf
print(tf.Summary().value)
print("Done")

>python bug.py
[]
Done

>pylint bug.py
No config file found, using default configuration
************* Module bug
E:  3, 6: Instance of 'Summary' has no 'value' member; maybe 'Value'? (no-member)

--------------------------------------------------------------------
Your code has been rated at -6.67/10 (previous run: -6.67/10, +0.00)

Current behavior

Error E1101

Expected behavior

No error

pylint --version output

No config file found, using default configuration
pylint 1.8.4,
astroid 1.6.3
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)]

Tensorflow package used is tensorflow-gpu (1.8.0rc0)

@PCManticore
Copy link
Contributor

Thanks for the report! I presume tensorflow does some metaprogramming that pylint doesn't yet comprehend. This would be a perfect candidate for an astroid brain tip, which is the usual solution whenever we encounter a library that uses metaprogramming concepts that pylint is not capable of understanding.

@PCManticore PCManticore added Bug 🪲 Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) labels Apr 24, 2018
@Pierre-Sassoulas Pierre-Sassoulas added Needs PR This issue is accepted, sufficiently specified and now needs an implementation Lib specific 💅 This affect the code from a particular library labels Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 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

3 participants