<commit_before>autopep8
========
.. image:: https://travis-ci.org/hhatto/autopep8.png?branch=master
   :target: https://travis-ci.org/hhatto/autopep8
   :alt: Build status


About
-----
autopep8 automatically formats Python code to conform to the `PEP 8`_ style
guide. It uses the pep8_ 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 pep8.

.. _PEP 8: http://www.python.org/dev/peps/pep-0008
.. _issues: https://github.com/jcrocholl/pep8/wiki/ErrorCodes


Installation
------------
from pip::

    $ pip install --upgrade autopep8

from easy_install::

    $ easy_install -ZU autopep8


Requirements
------------
autopep8 requires pep8_ (>= 1.3.2). Older versions of pep8 will also work, but
autopep8 will run pep8 in a subprocess in that case (for compatibility
purposes).

.. _pep8: https://github.com/jcrocholl/pep8


Usage
-----
To modify a file in place::

    $ autopep8 -i <filename>

Before running autopep8.

.. code-block:: python

    import sys, os;

    def someone_likes_semicolons(                             foo  = None            ,\
    bar='bar'):
        """Hello; bye."""; 1; 2;3
        print( 'A'<>foo)            #<> is a deprecated form of !=
        return 0;
    def func11():
        a=(   1,2, 3,"a"  );
        ####This is a long comment. This should be wrapped to fit within 72 characters.
        x = [a,[100,200,300,9876543210,'This is a long string that goes on and on']]
    def func22(): return {True: True}.has_key({'foo': 2}.has_key('foo'));
    class UselessClass(object):
        def __init__    ( self, bar ):
         #Comments should have a space after the hash.
         if bar : bar+=1;  bar=bar* bar   ; return bar
         else:
                        indentation_in_strings_should_not_be_touched = """
    		           hello
    world
    """
                        raise ValueError, indentation_in_strings_should_not_be_touched
        def my_method(self):
                                                  print(self);

After running autopep8.

.. code-block:: python

    import sys
    import os


    def someone_likes_semicolons(foo=None,
                                 bar='bar'):
        """Hello; bye."""
        1
        2
        3
        print('A' != foo)  # <> is a deprecated form of !=
        return 0


    def func11():
        a = (1, 2, 3, "a")
        # This is a long comment. This should be wrapped to fit within 72<commit_msg>Shorten example further<commit_after>autopep8
========
.. image:: https://travis-ci.org/hhatto/autopep8.png?branch=master
   :target: https://travis-ci.org/hhatto/autopep8
   :alt: Build status


About
-----
autopep8 automatically formats Python code to conform to the `PEP 8`_ style
guide. It uses the pep8_ 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 pep8.

.. _PEP 8: http://www.python.org/dev/peps/pep-0008
.. _issues: https://github.com/jcrocholl/pep8/wiki/ErrorCodes


Installation
------------
from pip::

    $ pip install --upgrade autopep8

from easy_install::

    $ easy_install -ZU autopep8


Requirements
------------
autopep8 requires pep8_ (>= 1.3.2). Older versions of pep8 will also work, but
autopep8 will run pep8 in a subprocess in that case (for compatibility
purposes).

.. _pep8: https://github.com/jcrocholl/pep8


Usage
-----
To modify a file in place::

    $ autopep8 -i <filename>

Before running autopep8.

.. code-block:: python

    import sys, os;

    def someone_likes_semicolons(                             foo  = None            ,\
    bar='bar'):
        """Hello; bye."""; print( 'A'<>foo)            #<> is a deprecated form of !=
        return 0;
    def func11():
        a=(   1,2, 3,"a"  );
        ####This is a long comment. This should be wrapped to fit within 72 characters.
        x = [a,[100,200,300,9876543210,'This is a long string that goes on and on']]
    def func22(): return {True: True}.has_key({'foo': 2}.has_key('foo'));
    class UselessClass(object):
        def __init__    ( self, bar ):
         #Comments should have a space after the hash.
         if bar : bar+=1;  bar=bar* bar   ; return bar
         else:
                        indentation_in_strings_should_not_be_touched = """
    		           hello
    world
    """
                        raise ValueError, indentation_in_strings_should_not_be_touched
        def my_method(self):
                                                  print(self);

After running autopep8.

.. code-block:: python

    import sys
    import os


    def someone_likes_semicolons(foo=None,
                                 bar='bar'):
        """Hello; bye."""
        print('A' != foo)  # <> is a deprecated form of !=
        return 0


    def func11():
        a = (1, 2, 3, "a")
        # This is a long comment. This should be wrapped to fit within 72
{'fraction_non_alphanumeric': 0.1200080272927955, 'fraction_numerical': 0.028496889424041744, 'mean_word_length': 2.0316301703163018, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6902047', 'n_tokens_mistral': 1654, 'n_tokens_neox': 1531, 'n_words': 492}