METADATA 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. Metadata-Version: 2.1
  2. Name: pycodestyle
  3. Version: 2.11.0
  4. Summary: Python style guide checker
  5. Home-page: https://pycodestyle.pycqa.org/
  6. Author: Johann C. Rocholl
  7. Author-email: johann@rocholl.net
  8. Maintainer: Ian Lee
  9. Maintainer-email: IanLee1521@gmail.com
  10. License: MIT
  11. Project-URL: Changes, https://pycodestyle.pycqa.org/en/latest/developer.html#changes
  12. Keywords: pycodestyle,pep8,PEP 8,PEP-8,PEP8
  13. Classifier: Development Status :: 5 - Production/Stable
  14. Classifier: Environment :: Console
  15. Classifier: Intended Audience :: Developers
  16. Classifier: License :: OSI Approved :: MIT License
  17. Classifier: Operating System :: OS Independent
  18. Classifier: Programming Language :: Python
  19. Classifier: Programming Language :: Python :: 3
  20. Classifier: Programming Language :: Python :: 3 :: Only
  21. Classifier: Programming Language :: Python :: Implementation :: CPython
  22. Classifier: Programming Language :: Python :: Implementation :: PyPy
  23. Classifier: Topic :: Software Development :: Libraries :: Python Modules
  24. Requires-Python: >=3.8
  25. Description-Content-Type: text/x-rst
  26. License-File: LICENSE
  27. pycodestyle (formerly called pep8) - Python style guide checker
  28. ===============================================================
  29. .. image:: https://github.com/PyCQA/pycodestyle/actions/workflows/main.yml/badge.svg
  30. :target: https://github.com/PyCQA/pycodestyle/actions/workflows/main.yml
  31. :alt: Build status
  32. .. image:: https://readthedocs.org/projects/pycodestyle/badge/?version=latest
  33. :target: https://pycodestyle.pycqa.org
  34. :alt: Documentation Status
  35. .. image:: https://img.shields.io/pypi/wheel/pycodestyle.svg
  36. :target: https://pypi.org/project/pycodestyle/
  37. :alt: Wheel Status
  38. .. image:: https://badges.gitter.im/PyCQA/pycodestyle.svg
  39. :alt: Join the chat at https://gitter.im/PyCQA/pycodestyle
  40. :target: https://gitter.im/PyCQA/pycodestyle?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
  41. pycodestyle is a tool to check your Python code against some of the style
  42. conventions in `PEP 8`_.
  43. .. _PEP 8: http://www.python.org/dev/peps/pep-0008/
  44. .. note::
  45. This package used to be called ``pep8`` but was renamed to ``pycodestyle``
  46. to reduce confusion. Further discussion can be found `in the issue where
  47. Guido requested this
  48. change <https://github.com/PyCQA/pycodestyle/issues/466>`_, or in the
  49. lightning talk at PyCon 2016 by @IanLee1521:
  50. `slides <https://speakerdeck.com/ianlee1521/pep8-vs-pep-8>`_
  51. `video <https://youtu.be/PulzIT8KYLk?t=36m>`_.
  52. Features
  53. --------
  54. * Plugin architecture: Adding new checks is easy.
  55. * Parseable output: Jump to error location in your editor.
  56. * Small: Just one Python file, requires only stdlib. You can use just
  57. the ``pycodestyle.py`` file for this purpose.
  58. * Comes with a comprehensive test suite.
  59. Installation
  60. ------------
  61. You can install, upgrade, and uninstall ``pycodestyle.py`` with these commands::
  62. $ pip install pycodestyle
  63. $ pip install --upgrade pycodestyle
  64. $ pip uninstall pycodestyle
  65. There's also a package for Debian/Ubuntu, but it's not always the
  66. latest version.
  67. Example usage and output
  68. ------------------------
  69. ::
  70. $ pycodestyle --first optparse.py
  71. optparse.py:69:11: E401 multiple imports on one line
  72. optparse.py:77:1: E302 expected 2 blank lines, found 1
  73. optparse.py:88:5: E301 expected 1 blank line, found 0
  74. optparse.py:347:31: E211 whitespace before '('
  75. optparse.py:357:17: E201 whitespace after '{'
  76. optparse.py:472:29: E221 multiple spaces before operator
  77. You can also make ``pycodestyle.py`` show the source code for each error, and
  78. even the relevant text from PEP 8::
  79. $ pycodestyle --show-source --show-pep8 testing/data/E40.py
  80. testing/data/E40.py:2:10: E401 multiple imports on one line
  81. import os, sys
  82. ^
  83. Imports should usually be on separate lines.
  84. Okay: import os\nimport sys
  85. E401: import sys, os
  86. Or you can display how often each error was found::
  87. $ pycodestyle --statistics -qq Python-2.5/Lib
  88. 232 E201 whitespace after '['
  89. 599 E202 whitespace before ')'
  90. 631 E203 whitespace before ','
  91. 842 E211 whitespace before '('
  92. 2531 E221 multiple spaces before operator
  93. 4473 E301 expected 1 blank line, found 0
  94. 4006 E302 expected 2 blank lines, found 1
  95. 165 E303 too many blank lines (4)
  96. 325 E401 multiple imports on one line
  97. 3615 E501 line too long (82 characters)
  98. Links
  99. -----
  100. * `Read the documentation <https://pycodestyle.pycqa.org/>`_
  101. * `Fork me on GitHub <http://github.com/PyCQA/pycodestyle>`_