# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-autopep8 VERSION= 1.5.7 KEYWORDS= python VARIANTS= py38 py39 SDESC[py38]= Automatic Python code formatter (PY38) SDESC[py39]= Automatic Python code formatter (PY39) HOMEPAGE= https://github.com/hhatto/autopep8 CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/a7/f6/84070ab117e6b080a87aac0ac9e4d269a66c6f6076ad81509bd0aac828d8 DISTFILE[1]= autopep8-1.5.7-py2.py3-none-any.whl:main DF_INDEX= 1 SPKGS[py38]= single SPKGS[py39]= single OPTIONS_AVAILABLE= PY38 PY39 OPTIONS_STANDARD= none VOPTS[py38]= PY38=ON PY39=OFF VOPTS[py39]= PY38=OFF PY39=ON DISTNAME= autopep8-1.5.7.dist-info GENERATED= yes [PY38].RUN_DEPENDS_ON= python-pycodestyle:single:py38 python-toml:single:py38 [PY38].USES_ON= python:py38,wheel [PY39].RUN_DEPENDS_ON= python-pycodestyle:single:py39 python-toml:single:py39 [PY39].USES_ON= python:py39,wheel [FILE:2666:descriptions/desc.single] ======== autopep8 ======== :alt: PyPI Version :alt: Build status :alt: Code Coverage autopep8 automatically formats Python code to conform to the `PEP 8`_ style guide. It uses the pycodestyle_ utility to determine what parts of the code needs to be formatted. autopep8 is capable of fixing most of the formatting issues_ that can be reported by pycodestyle. .. _PEP 8: https://www.python.org/dev/peps/pep-0008/ .. _issues: https://pycodestyle.readthedocs.org/en/latest/intro.html#error-codes .. contents:: Installation ============ From pip:: $ pip install --upgrade autopep8 Consider using the ``--user`` option_. .. _option: https://pip.pypa.io/en/latest/user_guide/#user-installs Requirements ============ autopep8 requires pycodestyle_. .. _pycodestyle: https://github.com/PyCQA/pycodestyle Usage ===== To modify a file in place (with aggressive level 2):: $ autopep8 --in-place --aggressive --aggressive Before running autopep8. .. code-block:: python import math, sys; def example1(): ####This is a long comment. This should be wrapped to fit within 72 characters. some_tuple=( 1,2, 3,'a' ); some_variable={'long':'Long code lines should be wrapped within 79 characters.', 'other':[math.pi, 100,200,300,9876543210,'This is a long string that goes on'], 'more':{'inner':'This whole logical line should be wrapped.',some_tuple:[1, 20,300,40000,500000000,60000000000000000]}} return (some_tuple, some_variable) def example2(): return {'has_key() is deprecated':True}.has_key({'f':2}.has_key('')); class Example3( object ): def __init__ ( self, bar ): #Comments should have a space after the hash. if bar : bar+=1; bar=bar* bar ; return bar else: some_string = """ Indentation in multiline strings should not be touched. Only actual code should be reindented. """ return (sys.path, some_string) After running autopep8. .. code-block:: python import math import sys def example1(): # This is a long comment. This should be wrapped to fit within 72 # characters. some_tuple = (1, 2, 3, 'a') some_variable = { 'long': 'Long code lines should be wrapped within 79 characters.', 'other': [ math.pi, 100, 200, 300, 9876543210, 'This is a long string that goes on'], 'more': { 'inner': 'This whole logical line should be wrapped.', [FILE:114:distinfo] aa213493c30dcdac99537249ee65b24af0b2c29f2e83cd8b3f68760441ed0db9 45046 autopep8-1.5.7-py2.py3-none-any.whl