diff options
author | Ian Lee <IanLee1521@gmail.com> | 2016-05-31 09:34:12 -0700 |
---|---|---|
committer | Ian Lee <IanLee1521@gmail.com> | 2016-05-31 09:34:12 -0700 |
commit | b6cef1792b6e2d93e67db26b05aeaceb78ddc31e (patch) | |
tree | c063f331bc3ee8152c032a1cedcce63b25a9d80a | |
parent | 504d8dca1c611405b5800b695a0f3ea656c7b1cf (diff) | |
download | pep8-b6cef1792b6e2d93e67db26b05aeaceb78ddc31e.tar.gz |
Added pycodestyle entrypoint
-rwxr-xr-x | pep8.py | 17 | ||||
-rw-r--r-- | setup.py | 3 |
2 files changed, 19 insertions, 1 deletions
@@ -54,6 +54,7 @@ import time import inspect import keyword import tokenize +import warnings from optparse import OptionParser from fnmatch import fnmatch try: @@ -2147,5 +2148,21 @@ def _main(): sys.stderr.write(str(report.total_errors) + '\n') sys.exit(1) + +def _main_pep8(): + """Entrypoint for pep8 commandline tool. + + Warn of deprecation and advise users to switch to pycodestyle. + """ + print( + 'Deprecation Warning:\n' + 'Use of the pep8 tool will be removed in a future release.\n' + 'Please install and use `pycodestyle` instead.\n' + ) + warnings.warn('pep8 has been renamed to pycodestyle (GitHub issue #466)') + + _main() + + if __name__ == '__main__': _main() @@ -40,7 +40,8 @@ setup( ], entry_points={ 'console_scripts': [ - 'pep8 = pep8:_main', + 'pycodestyle = pep8:_main', + 'pep8 = pep8:_main_pep8', ], }, classifiers=[ |