tensorlayer / seq2seq-chatbot

Chatbot in 200 lines of code using TensorLayer
https://github.com/tensorlayer/tensorlayer
836 stars 315 forks source link

Undefined names can raise NameError at runtime #1

Closed cclauss closed 7 years ago

cclauss commented 7 years ago

flake8 testing of https://github.com/zsdonghao/seq2seq-chatbot on Python 2.7.13

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./tensorlayer/layers.py:5976:49: F821 undefined name 'single_cell'
            cell = tf.contrib.rnn.MultiRNNCell([single_cell] * num_layers)
                                                ^

./tensorlayer/layers.py:5978:49: F821 undefined name 'single_cell'
            cell = tf.nn.rnn_cell.MultiRNNCell([single_cell] * num_layers)
                                                ^

./tensorlayer/prepro.py:1007:8: F821 undefined name 'is_random'
    if is_random:
       ^
zsdonghao commented 7 years ago

Thanks