Closed petrux closed 1 year ago
Thank you for submitting an issue. Can you check with latest pylint (1.6.5, astroid 1.4.9) and let me know if it still reproduces?
Apparently, yes:
petrux@orion:~$ pylint --version
No config file found, using default configuration
pylint 1.6.5,
astroid 1.4.9
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609]
petrux@orion:~$ cat test.py
import tensorflow as tf
next(tf.variable_scope('MyScope').gen)
petrux@orion:~$ pylint test.py
No config file found, using default configuration
************* Module test
C: 1, 0: Missing module docstring (missing-docstring)
E: 2, 5: Generator 'generator' has no 'gen' member (no-member)
Report
======
2 statements analysed.
Statistics by type
------------------
+---------+-------+-----------+-----------+------------+---------+
|type |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module |1 |1 |= |0.00 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
|class |0 |0 |= |0 |0 |
+---------+-------+-----------+-----------+------------+---------+
|method |0 |0 |= |0 |0 |
+---------+-------+-----------+-----------+------------+---------+
|function |0 |0 |= |0 |0 |
+---------+-------+-----------+-----------+------------+---------+
External dependencies
---------------------
::
tensorflow (test)
Raw metrics
-----------
+----------+-------+------+---------+-----------+
|type |number |% |previous |difference |
+==========+=======+======+=========+===========+
|code |2 |66.67 |2 |= |
+----------+-------+------+---------+-----------+
|docstring |0 |0.00 |0 |= |
+----------+-------+------+---------+-----------+
|comment |0 |0.00 |0 |= |
+----------+-------+------+---------+-----------+
|empty |1 |33.33 |1 |= |
+----------+-------+------+---------+-----------+
Duplication
-----------
+-------------------------+------+---------+-----------+
| |now |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines |0 |0 |= |
+-------------------------+------+---------+-----------+
|percent duplicated lines |0.000 |0.000 |= |
+-------------------------+------+---------+-----------+
Messages by category
--------------------
+-----------+-------+---------+-----------+
|type |number |previous |difference |
+===========+=======+=========+===========+
|convention |1 |1 |= |
+-----------+-------+---------+-----------+
|refactor |0 |0 |= |
+-----------+-------+---------+-----------+
|warning |0 |0 |= |
+-----------+-------+---------+-----------+
|error |1 |1 |= |
+-----------+-------+---------+-----------+
Messages
--------
+------------------+------------+
|message id |occurrences |
+==================+============+
|no-member |1 |
+------------------+------------+
|missing-docstring |1 |
+------------------+------------+
Global evaluation
-----------------
Your code has been rated at -20.00/10 (previous run: -20.00/10, +0.00)
@petrux Hello, I'm having the same problem with the code as you in this project file: https://github.com/dkmfbk/dket May I ask you to tell me how you solved this problem?
There's a number of way to fix this see the documentation for no-member: https://pylint.pycqa.org/en/latest/user_guide/messages/error/no-member.html.
I'm going to close because this kind of thing should be handled in a pylint-tensorflow
plugin or can be alleviated with configuration. And this is unlikely to be ever fixed in pylint.
Steps to reproduce
pylint
on the following python snippet:Current behavior
For short, the error is
E: 2, 5: Generator 'generator' has no 'gen' member (no-member)
.Here follows the full
pylint
output.Expected behavior
No error.
pylint --version output