summaryrefslogtreecommitdiff
path: root/pep8.py
diff options
context:
space:
mode:
Diffstat (limited to 'pep8.py')
-rwxr-xr-xpep8.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/pep8.py b/pep8.py
index 3c950d4..8091413 100755
--- a/pep8.py
+++ b/pep8.py
@@ -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()