Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Missing import sys and other issues #11

Open
cclauss opened this issue May 30, 2019 · 0 comments
Open

Missing import sys and other issues #11

cclauss opened this issue May 30, 2019 · 0 comments

Comments

@cclauss
Copy link

cclauss commented May 30, 2019

flake8 testing of https://github.com/sogou/SMRCToolkit on Python 3.7.1

$ flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics

./sogou_mrc/dataset/squadv2.py:88:55: F632 use ==/!= to compare str, bytes, and int literals
            "answer_start": answer_token_starts[0] if len(answer_token_starts) > 0 is not None else None,
                                                      ^
./sogou_mrc/dataset/squadv2.py:89:51: F632 use ==/!= to compare str, bytes, and int literals
            "answer_end": answer_token_ends[0] if len(answer_token_ends) > 0 is not None else None,
                                                  ^
./sogou_mrc/dataset/coqa.py:363:21: F821 undefined name 'sys'
                    sys.stderr.write("Turn id should match index {}: {}\n".format(i + 1, qa))
                    ^
./sogou_mrc/dataset/coqa.py:368:25: F821 undefined name 'sys'
                        sys.stderr.write("Question turn id does match answer: {} {}\n".format(qa, answer))
                        ^
./sogou_mrc/dataset/coqa.py:372:21: F821 undefined name 'sys'
                    sys.stderr.write("Gold file has duplicate stories: {}".format(source))
                    ^
./sogou_mrc/libraries/tokenization.py:39:27: F821 undefined name 'unicode'
    elif isinstance(text, unicode):
                          ^
./sogou_mrc/libraries/tokenization.py:62:27: F821 undefined name 'unicode'
    elif isinstance(text, unicode):
                          ^
./sogou_mrc/libraries/modeling.py:364:10: F821 undefined name 'output'
  return output
         ^
2     F632 use ==/!= to compare str, bytes, and int literals
6     F821 undefined name 'sys'
8
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant