diff options
author | Ian Lee <IanLee1521@gmail.com> | 2016-05-31 12:45:40 -0700 |
---|---|---|
committer | Ian Lee <IanLee1521@gmail.com> | 2016-05-31 12:45:40 -0700 |
commit | d4a60037be95b4b5f84a040bc40ce2ca703640bb (patch) | |
tree | e4674718308d483fa42f80c4d748570f122dd349 | |
parent | 24d3ca653bce603ed7468de1df2c7f9279e87113 (diff) | |
download | pep8-d4a60037be95b4b5f84a040bc40ce2ca703640bb.tar.gz |
Removed pycodestyle entry point
This essentially reverts part of b6cef179, leaving only the
(now more nicely formatted) warning text).
-rwxr-xr-x | pep8.py | 29 | ||||
-rw-r--r-- | setup.py | 3 |
2 files changed, 14 insertions, 18 deletions
@@ -2116,7 +2116,19 @@ def _parse_multi_options(options, split_token=','): def _main(): - """Parse options and run checks on Python source.""" + """Parse options and run checks on Python source. + + Warn of deprecation and advise users to switch to pycodestyle. + """ + warnings.warn( + '\n\n' + 'pep8 has been renamed to pycodestyle (GitHub issue #466)\n' + 'Use of the pep8 tool will be removed in a future release.\n' + 'Please install and use `pycodestyle` instead.\n\n' + '$ pip install pycodestyle\n' + '$ pycodestyle ...\n' + ) + import signal # Handle "Broken pipe" gracefully @@ -2149,20 +2161,5 @@ def _main(): 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,8 +40,7 @@ setup( ], entry_points={ 'console_scripts': [ - 'pycodestyle = pep8:_main', - 'pep8 = pep8:_main_pep8', + 'pep8 = pep8:_main', ], }, classifiers=[ |