summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lee <IanLee1521@gmail.com>2016-05-31 12:45:40 -0700
committerIan Lee <IanLee1521@gmail.com>2016-05-31 12:45:40 -0700
commitd4a60037be95b4b5f84a040bc40ce2ca703640bb (patch)
treee4674718308d483fa42f80c4d748570f122dd349
parent24d3ca653bce603ed7468de1df2c7f9279e87113 (diff)
downloadpep8-d4a60037be95b4b5f84a040bc40ce2ca703640bb.tar.gz
Removed pycodestyle entry point
This essentially reverts part of b6cef179, leaving only the (now more nicely formatted) warning text).
-rwxr-xr-xpep8.py29
-rw-r--r--setup.py3
2 files changed, 14 insertions, 18 deletions
diff --git a/pep8.py b/pep8.py
index 60f6ebc..5220346 100755
--- a/pep8.py
+++ b/pep8.py
@@ -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()
diff --git a/setup.py b/setup.py
index f755626..421fe03 100644
--- a/setup.py
+++ b/setup.py
@@ -40,8 +40,7 @@ setup(
],
entry_points={
'console_scripts': [
- 'pycodestyle = pep8:_main',
- 'pep8 = pep8:_main_pep8',
+ 'pep8 = pep8:_main',
],
},
classifiers=[