summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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=[