pytype
pytype copied to clipboard
`tensorflow.keras.backend` import breaks `pytype`
When linting the following code with [email protected]
adding a from tensorflow.keras import backend
import breaks linting.
The following code breaks:
import tensorflow as tf
from tensorflow.keras import backend # This line breaks linting in line 4
print(tf.keras.models.Sequential())
File "tf_imports.py", line 4, in <module>: No attribute 'models' on module 'tensorflow.keras' [module-attr]
However the removing line 2 seems to make pytype
happy again:
import tensorflow as tf
print(tf.keras.models.Sequential())
I tested this with Tensorflow v2.5.0 and v2.6.0.