SamuraiT / mecab-python3

:snake: mecab-python. you can find original version here:http://taku910.github.io/mecab/
https://pypi.python.org/pypi/mecab-python3
Other
541 stars 51 forks source link

tox.ini: Find undefined names #28

Closed cclauss closed 5 years ago

cclauss commented 5 years ago

This test is looking for undefined names these are often names that were removed from the language (xrange, unicode, basestring), or missing imports (see sys below), or missing self parameters in methods, or missing global declarations, or refactoring mistakes, or just plain typos. These are the kind of issues that a compiler would flag in a compiled language. These issues are not style related.

$ flake8 . --count --select=F821 --show-source --statistics

./src/MeCab/__init__.py:87:14: F821 undefined name '_Tagger'
class Tagger(_Tagger):
             ^
./src/MeCab/__init__.py:90:13: F821 undefined name '_Tagger'
            _Tagger.__init__(self, *args)
            ^
./src/MeCab/__init__.py:95:13: F821 undefined name '_Model'
class Model(_Model):
            ^
./src/MeCab/__init__.py:98:13: F821 undefined name '_Model'
            _Model.__init__(self, *args)
            ^
./scripts/travis-deploy.py:16:9: F821 undefined name 'sys'
        sys.exit(1)
        ^
./scripts/travis-deploy.py:32:13: F821 undefined name 'sys'
            sys.exit(1)
            ^
./scripts/travis-build.py:39:34: F821 undefined name 'DISTRO'
                         .format(DISTRO))
                                 ^
./scripts/travis-build.py:114:38: F821 undefined name 'DISTRO'
                             .format(DISTRO))
                                     ^
./scripts/utils.py:76:37: F821 undefined name 'status'
                sh_quote(argv[0]), -status))
                                    ^
./scripts/utils.py:106:37: F821 undefined name 'status'
                sh_quote(argv[0]), -status))
                                    ^
./scripts/utils.py:169:26: F821 undefined name 'dest'
                sh_quote(dest), e.strerror))
                         ^
11    F821 undefined name 'DISTRO'
11
zackw commented 5 years ago

Thank you for thinking of this and doing the work to set it up. I have combined this and your other two pull requests, plus further work to correct the remaining errors, into a single commit (56e5d33) and merged it.