METADATA 4.4 KB

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