flake8 testing of https://github.com/salesforce/nonauto-nmt on Python 3.6.3
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./model.py:92:75: F821 undefined name 'the_mask'
return targets[input_mask], out[out_mask].view(-1, out.size(-1)), the_mask
^
./self_learn.py:626:48: F821 undefined name 'align_index'
decoding1 = unsorted(decoding, align_index)
^
./self_learn.py:905:45: F821 undefined name 'loss_alter'
loss_alter, loss_worse = export(loss_alter), export(loss_worse)
^
./self_learn.py:905:65: F821 undefined name 'loss_worse'
loss_alter, loss_worse = export(loss_alter), export(loss_worse)
^
./self_learn.py:1342:78: F821 undefined name 'fertility_mode'
names = ['dev.src.b{}={}.{}'.format(args.beam_size, args.load_from, args,fertility_mode),
^
./self_learn.py:1343:77: F821 undefined name 'fertility_mode'
'dev.trg.b{}={}.{}'.format(args.beam_size, args.load_from, args,fertility_mode),
^
./self_learn.py:1344:77: F821 undefined name 'fertility_mode'
'dev.dec.b{}={}.{}'.format(args.beam_size, args.load_from, args,fertility_mode)]
^
./train.py:35:17: F821 undefined name 'copy'
new_batch = copy.copy(batch)
^
8 F821 undefined name 'the_mask'
8
cla:missing