commit python-pep8 for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package python-pep8 for openSUSE:Factory checked in at 2016-01-20 09:53:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pep8 (Old) and /work/SRC/openSUSE:Factory/.python-pep8.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-pep8" Changes: -------- --- /work/SRC/openSUSE:Factory/python-pep8/python-pep8.changes 2015-02-20 12:00:50.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-pep8.new/python-pep8.changes 2016-01-20 09:53:32.000000000 +0100 @@ -1,0 +2,22 @@ +Wed Jan 13 09:35:26 UTC 2016 - toddrme2178@gmail.com + +- Implement update-alternatives + +------------------------------------------------------------------- +Wed Jan 13 09:19:24 UTC 2016 - toddrme2178@gmail.com + +- Update to 1.7.0 + + Announcements: + * Repository moved to PyCQA Organization on GitHub: + https://github.com/pycqa/pep8 + + Changes: + * Reverted the fix in #368, "options passed on command line are only ones + accepted" feature. This has many unintended consequences in pep8 and flake8 + and needs to be reworked when I have more time. + * Added support for Python 3.5. (Issue #420 & #459) + * Added support for multi-line config_file option parsing. (Issue #429) + * Improved parameter parsing. (Issues #420 & #456) + + Bugs: + * Fixed BytesWarning on Python 3. (Issue #459) + +------------------------------------------------------------------- Old: ---- pep8-1.6.2.tar.gz New: ---- pep8-1.7.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pep8.spec ++++++ --- /var/tmp/diff_new_pack.xFcLmq/_old 2016-01-20 09:53:33.000000000 +0100 +++ /var/tmp/diff_new_pack.xFcLmq/_new 2016-01-20 09:53:33.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-pep8 # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,9 +17,9 @@ Name: python-pep8 -Version: 1.6.2 +Version: 1.7.0 Release: 0 -Url: http://github.com/jcrocholl/pep8 +Url: https://github.com/pycqa/pep8 Summary: Python style guide checker License: MIT Group: Development/Languages/Python @@ -29,10 +29,11 @@ BuildRequires: python-devel BuildRequires: python-setuptools Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives %if 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %else -%py_requires BuildArch: noarch %endif @@ -48,8 +49,25 @@ %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} + +# Prepare for update-alternatives usage +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +mv %{buildroot}%{_bindir}/pep8 %{buildroot}%{_bindir}/pep8-%{py_ver} +ln -s -f %{_sysconfdir}/alternatives/pep8 %{buildroot}%{_bindir}/pep8 +# create a dummy target for /etc/alternatives/pep8 +touch %{buildroot}%{_sysconfdir}/alternatives/pep8 + %fdupes %{buildroot}%{python_sitelib} +%post +"%_sbindir/update-alternatives" \ + --install %{_bindir}/pep8 pep8 %{_bindir}/pep8-%{py_ver} 30 + +%postun +if [ $1 -eq 0 ] ; then + "%_sbindir/update-alternatives" --remove pep8 %{_bindir}/pep8-%{py_ver} +fi + %check python setup.py test @@ -57,7 +75,9 @@ %defattr(-,root,root) %doc CHANGES.txt README.rst %{_bindir}/pep8 +%{_bindir}/pep8-%{py_ver} +%ghost %{_sysconfdir}/alternatives/pep8 %{python_sitelib}/pep8.py* -%{python_sitelib}/pep8-%{version}-py%{py_ver}.egg-info/ +%{python_sitelib}/pep8-%{version}-py*.egg-info %changelog ++++++ pep8-1.6.2.tar.gz -> pep8-1.7.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/CHANGES.txt new/pep8-1.7.0/CHANGES.txt --- old/pep8-1.6.2/CHANGES.txt 2015-02-15 23:06:06.000000000 +0100 +++ new/pep8-1.7.0/CHANGES.txt 2016-01-12 19:40:45.000000000 +0100 @@ -2,6 +2,27 @@ ========= +1.7.0 (2016-01-12) +------------------ + +Announcements: + +* Repository moved to PyCQA Organization on GitHub: + https://github.com/pycqa/pep8 + +Changes: + +* Reverted the fix in #368, "options passed on command line are only ones + accepted" feature. This has many unintended consequences in pep8 and flake8 + and needs to be reworked when I have more time. +* Added support for Python 3.5. (Issue #420 & #459) +* Added support for multi-line config_file option parsing. (Issue #429) +* Improved parameter parsing. (Issues #420 & #456) + +Bugs: + +* Fixed BytesWarning on Python 3. (Issue #459) + 1.6.2 (2015-02-15) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/CONTRIBUTING.rst new/pep8-1.7.0/CONTRIBUTING.rst --- old/pep8-1.6.2/CONTRIBUTING.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pep8-1.7.0/CONTRIBUTING.rst 2016-01-02 20:54:54.000000000 +0100 @@ -0,0 +1,4 @@ +Contributing to ``pep8`` +======================== + +Please see the `developer notes <https://pep8.readthedocs.org/en/latest/developer.html>`_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/PKG-INFO new/pep8-1.7.0/PKG-INFO --- old/pep8-1.6.2/PKG-INFO 2015-02-15 23:07:16.000000000 +0100 +++ new/pep8-1.7.0/PKG-INFO 2016-01-12 19:42:59.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pep8 -Version: 1.6.2 +Version: 1.7.0 Summary: Python style guide checker Home-page: http://pep8.readthedocs.org/ Author: Johann C. Rocholl @@ -86,8 +86,8 @@ Links ----- - .. image:: https://api.travis-ci.org/jcrocholl/pep8.png?branch=master - :target: https://travis-ci.org/jcrocholl/pep8 + .. image:: https://api.travis-ci.org/PyCQA/pep8.png?branch=master + :target: https://travis-ci.org/PyCQA/pep8 :alt: Build status .. image:: https://pypip.in/wheel/pep8/badge.png?branch=master @@ -96,13 +96,34 @@ * `Read the documentation <http://pep8.readthedocs.org/>`_ - * `Fork me on GitHub <http://github.com/jcrocholl/pep8>`_ + * `Fork me on GitHub <http://github.com/PyCQA/pep8>`_ Changelog ========= + 1.7.0 (2016-01-12) + ------------------ + + Announcements: + + * Repository moved to PyCQA Organization on GitHub: + https://github.com/pycqa/pep8 + + Changes: + + * Reverted the fix in #368, "options passed on command line are only ones + accepted" feature. This has many unintended consequences in pep8 and flake8 + and needs to be reworked when I have more time. + * Added support for Python 3.5. (Issue #420 & #459) + * Added support for multi-line config_file option parsing. (Issue #429) + * Improved parameter parsing. (Issues #420 & #456) + + Bugs: + + * Fixed BytesWarning on Python 3. (Issue #459) + 1.6.2 (2015-02-15) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/README.rst new/pep8-1.7.0/README.rst --- old/pep8-1.6.2/README.rst 2015-01-01 02:17:54.000000000 +0100 +++ new/pep8-1.7.0/README.rst 2015-09-07 08:38:04.000000000 +0200 @@ -78,8 +78,8 @@ Links ----- -.. image:: https://api.travis-ci.org/jcrocholl/pep8.png?branch=master - :target: https://travis-ci.org/jcrocholl/pep8 +.. image:: https://api.travis-ci.org/PyCQA/pep8.png?branch=master + :target: https://travis-ci.org/PyCQA/pep8 :alt: Build status .. image:: https://pypip.in/wheel/pep8/badge.png?branch=master @@ -88,4 +88,4 @@ * `Read the documentation <http://pep8.readthedocs.org/>`_ -* `Fork me on GitHub <http://github.com/jcrocholl/pep8>`_ +* `Fork me on GitHub <http://github.com/PyCQA/pep8>`_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/docs/advanced.rst new/pep8-1.7.0/docs/advanced.rst --- old/pep8-1.6.2/docs/advanced.rst 2014-12-07 05:52:39.000000000 +0100 +++ new/pep8-1.7.0/docs/advanced.rst 2015-09-08 00:50:03.000000000 +0200 @@ -42,7 +42,7 @@ ---------------- Another example is related to the `feature request #143 -<https://github.com/jcrocholl/pep8/issues/143>`_: skip a number of lines +<https://github.com/pycqa/pep8/issues/143>`_: skip a number of lines at the beginning and the end of a file. This use case is easy to implement through a custom wrapper for the PEP 8 library:: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/docs/conf.py new/pep8-1.7.0/docs/conf.py --- old/pep8-1.6.2/docs/conf.py 2015-01-01 02:17:54.000000000 +0100 +++ new/pep8-1.7.0/docs/conf.py 2016-01-02 20:56:25.000000000 +0100 @@ -46,7 +46,7 @@ # General information about the project. project = u'pep8' authors = u'Johann C. Rocholl, Florent Xicluna, Ian Lee' -copyright = u'2006-2014, %s' % (authors) +copyright = u'2006-2016, %s' % (authors) # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -99,7 +99,11 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +if not on_rtd: # only import and set the theme if we're building docs locally + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/docs/developer.rst new/pep8-1.7.0/docs/developer.rst --- old/pep8-1.6.2/docs/developer.rst 2015-01-01 02:17:54.000000000 +0100 +++ new/pep8-1.7.0/docs/developer.rst 2016-01-02 20:54:54.000000000 +0100 @@ -11,13 +11,28 @@ The source code is currently `available on GitHub`_ under the terms and conditions of the :ref:`Expat license <license>`. Fork away! -* `Source code <https://github.com/jcrocholl/pep8>`_ and - `issue tracker <https://github.com/jcrocholl/pep8/issues>`_ on GitHub. -* `Continuous tests <http://travis-ci.org/jcrocholl/pep8>`_ against Python +* `Source code <https://github.com/pycqa/pep8>`_ and + `issue tracker <https://github.com/pycqa/pep8/issues>`_ on GitHub. +* `Continuous tests <http://travis-ci.org/pycqa/pep8>`_ against Python 2.6 through 3.4 and PyPy, on `Travis-CI platform <http://about.travis-ci.org/>`_. -.. _available on GitHub: https://github.com/jcrocholl/pep8 +.. _available on GitHub: https://github.com/pycqa/pep8 + + +Direction +~~~~~~~~~ + +Some high-level aims and directions to bear in mind for contributions: + +* ``pep8`` is intended to be as fast as possible. + Using the ``ast`` module defeats that purpose. + The `pep8-naming <https://github.com/flintwork/pep8-naming>`_ plugin exists for this sort of functionality. +* If you want to provide extensibility / plugins, + please see `flake8 <https://gitlab.com/pycqa/flake8>`_ - + ``pep8`` doesn't want or need a plugin architecture. +* Python 2.6 support is still deemed important. +* ``pep8`` aims to have no external dependencies. Contribute diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/docs/index.rst new/pep8-1.7.0/docs/index.rst --- old/pep8-1.6.2/docs/index.rst 2015-01-01 02:17:54.000000000 +0100 +++ new/pep8-1.7.0/docs/index.rst 2015-09-08 00:50:03.000000000 +0200 @@ -22,7 +22,7 @@ developer * Online documentation: http://pep8.readthedocs.org/ -* Source code and issue tracker: https://github.com/jcrocholl/pep8 +* Source code and issue tracker: https://github.com/pycqa/pep8 Indices and tables diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/docs/intro.rst new/pep8-1.7.0/docs/intro.rst --- old/pep8-1.6.2/docs/intro.rst 2015-02-14 23:52:43.000000000 +0100 +++ new/pep8-1.7.0/docs/intro.rst 2015-10-25 18:52:26.000000000 +0100 @@ -207,201 +207,202 @@ these files have a ``[pep8]`` section, no project specific configuration is loaded. -If the ``ignore`` option is not in the configuration and not in the arguments, -only the error codes ``E123/E133``, ``E226`` and ``E241/E242`` are ignored -(see below). - Error codes ----------- This is the current list of error and warning codes: -+----------+----------------------------------------------------------------------+ -| code | sample message | -+==========+======================================================================+ -| **E1** | *Indentation* | -+----------+----------------------------------------------------------------------+ -| E101 | indentation contains mixed spaces and tabs | -+----------+----------------------------------------------------------------------+ -| E111 | indentation is not a multiple of four | -+----------+----------------------------------------------------------------------+ -| E112 | expected an indented block | -+----------+----------------------------------------------------------------------+ -| E113 | unexpected indentation | -+----------+----------------------------------------------------------------------+ -| E114 | indentation is not a multiple of four (comment) | -+----------+----------------------------------------------------------------------+ -| E115 | expected an indented block (comment) | -+----------+----------------------------------------------------------------------+ -| E116 | unexpected indentation (comment) | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| E121 (*^)| continuation line under-indented for hanging indent | -+----------+----------------------------------------------------------------------+ -| E122 (^) | continuation line missing indentation or outdented | -+----------+----------------------------------------------------------------------+ -| E123 (*) | closing bracket does not match indentation of opening bracket's line | -+----------+----------------------------------------------------------------------+ -| E124 (^) | closing bracket does not match visual indentation | -+----------+----------------------------------------------------------------------+ -| E125 (^) | continuation line with same indent as next logical line | -+----------+----------------------------------------------------------------------+ -| E126 (*^)| continuation line over-indented for hanging indent | -+----------+----------------------------------------------------------------------+ -| E127 (^) | continuation line over-indented for visual indent | -+----------+----------------------------------------------------------------------+ -| E128 (^) | continuation line under-indented for visual indent | -+----------+----------------------------------------------------------------------+ -| E129 (^) | visually indented line with same indent as next logical line | -+----------+----------------------------------------------------------------------+ -| E131 (^) | continuation line unaligned for hanging indent | -+----------+----------------------------------------------------------------------+ -| E133 (*) | closing bracket is missing indentation | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| **E2** | *Whitespace* | -+----------+----------------------------------------------------------------------+ -| E201 | whitespace after '(' | -+----------+----------------------------------------------------------------------+ -| E202 | whitespace before ')' | -+----------+----------------------------------------------------------------------+ -| E203 | whitespace before ':' | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| E211 | whitespace before '(' | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| E221 | multiple spaces before operator | -+----------+----------------------------------------------------------------------+ -| E222 | multiple spaces after operator | -+----------+----------------------------------------------------------------------+ -| E223 | tab before operator | -+----------+----------------------------------------------------------------------+ -| E224 | tab after operator | -+----------+----------------------------------------------------------------------+ -| E225 | missing whitespace around operator | -+----------+----------------------------------------------------------------------+ -| E226 (*) | missing whitespace around arithmetic operator | -+----------+----------------------------------------------------------------------+ -| E227 | missing whitespace around bitwise or shift operator | -+----------+----------------------------------------------------------------------+ -| E228 | missing whitespace around modulo operator | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| E231 | missing whitespace after ',', ';', or ':' | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| E241 (*) | multiple spaces after ',' | -+----------+----------------------------------------------------------------------+ -| E242 (*) | tab after ',' | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| E251 | unexpected spaces around keyword / parameter equals | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| E261 | at least two spaces before inline comment | -+----------+----------------------------------------------------------------------+ -| E262 | inline comment should start with '# ' | -+----------+----------------------------------------------------------------------+ -| E265 | block comment should start with '# ' | -+----------+----------------------------------------------------------------------+ -| E266 | too many leading '#' for block comment | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| E271 | multiple spaces after keyword | -+----------+----------------------------------------------------------------------+ -| E272 | multiple spaces before keyword | -+----------+----------------------------------------------------------------------+ -| E273 | tab after keyword | -+----------+----------------------------------------------------------------------+ -| E274 | tab before keyword | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| **E3** | *Blank line* | -+----------+----------------------------------------------------------------------+ -| E301 | expected 1 blank line, found 0 | -+----------+----------------------------------------------------------------------+ -| E302 | expected 2 blank lines, found 0 | -+----------+----------------------------------------------------------------------+ -| E303 | too many blank lines (3) | -+----------+----------------------------------------------------------------------+ -| E304 | blank lines found after function decorator | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| **E4** | *Import* | -+----------+----------------------------------------------------------------------+ -| E401 | multiple imports on one line | -+----------+----------------------------------------------------------------------+ -| E402 | module level import not at top of file | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| **E5** | *Line length* | -+----------+----------------------------------------------------------------------+ -| E501 (^) | line too long (82 > 79 characters) | -+----------+----------------------------------------------------------------------+ -| E502 | the backslash is redundant between brackets | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| **E7** | *Statement* | -+----------+----------------------------------------------------------------------+ -| E701 | multiple statements on one line (colon) | -+----------+----------------------------------------------------------------------+ -| E702 | multiple statements on one line (semicolon) | -+----------+----------------------------------------------------------------------+ -| E703 | statement ends with a semicolon | -+----------+----------------------------------------------------------------------+ -| E704 (*) | multiple statements on one line (def) | -+----------+----------------------------------------------------------------------+ -| E711 (^) | comparison to None should be 'if cond is None:' | -+----------+----------------------------------------------------------------------+ -| E712 (^) | comparison to True should be 'if cond is True:' or 'if cond:' | -+----------+----------------------------------------------------------------------+ -| E713 | test for membership should be 'not in' | -+----------+----------------------------------------------------------------------+ -| E714 | test for object identity should be 'is not' | -+----------+----------------------------------------------------------------------+ -| E721 (^) | do not compare types, use 'isinstance()' | -+----------+----------------------------------------------------------------------+ -| E731 | do not assign a lambda expression, use a def | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| **E9** | *Runtime* | -+----------+----------------------------------------------------------------------+ -| E901 | SyntaxError or IndentationError | -+----------+----------------------------------------------------------------------+ -| E902 | IOError | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| **W1** | *Indentation warning* | -+----------+----------------------------------------------------------------------+ -| W191 | indentation contains tabs | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| **W2** | *Whitespace warning* | -+----------+----------------------------------------------------------------------+ -| W291 | trailing whitespace | -+----------+----------------------------------------------------------------------+ -| W292 | no newline at end of file | -+----------+----------------------------------------------------------------------+ -| W293 | blank line contains whitespace | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| **W3** | *Blank line warning* | -+----------+----------------------------------------------------------------------+ -| W391 | blank line at end of file | -+----------+----------------------------------------------------------------------+ -+----------+----------------------------------------------------------------------+ -| **W6** | *Deprecation warning* | -+----------+----------------------------------------------------------------------+ -| W601 | .has_key() is deprecated, use 'in' | -+----------+----------------------------------------------------------------------+ -| W602 | deprecated form of raising exception | -+----------+----------------------------------------------------------------------+ -| W603 | '<>' is deprecated, use '!=' | -+----------+----------------------------------------------------------------------+ -| W604 | backticks are deprecated, use 'repr()' | -+----------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| code | sample message | ++============+======================================================================+ +| **E1** | *Indentation* | ++------------+----------------------------------------------------------------------+ +| E101 | indentation contains mixed spaces and tabs | ++------------+----------------------------------------------------------------------+ +| E111 | indentation is not a multiple of four | ++------------+----------------------------------------------------------------------+ +| E112 | expected an indented block | ++------------+----------------------------------------------------------------------+ +| E113 | unexpected indentation | ++------------+----------------------------------------------------------------------+ +| E114 | indentation is not a multiple of four (comment) | ++------------+----------------------------------------------------------------------+ +| E115 | expected an indented block (comment) | ++------------+----------------------------------------------------------------------+ +| E116 | unexpected indentation (comment) | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| E121 (\*^) | continuation line under-indented for hanging indent | ++------------+----------------------------------------------------------------------+ +| E122 (^) | continuation line missing indentation or outdented | ++------------+----------------------------------------------------------------------+ +| E123 (*) | closing bracket does not match indentation of opening bracket's line | ++------------+----------------------------------------------------------------------+ +| E124 (^) | closing bracket does not match visual indentation | ++------------+----------------------------------------------------------------------+ +| E125 (^) | continuation line with same indent as next logical line | ++------------+----------------------------------------------------------------------+ +| E126 (\*^) | continuation line over-indented for hanging indent | ++------------+----------------------------------------------------------------------+ +| E127 (^) | continuation line over-indented for visual indent | ++------------+----------------------------------------------------------------------+ +| E128 (^) | continuation line under-indented for visual indent | ++------------+----------------------------------------------------------------------+ +| E129 (^) | visually indented line with same indent as next logical line | ++------------+----------------------------------------------------------------------+ +| E131 (^) | continuation line unaligned for hanging indent | ++------------+----------------------------------------------------------------------+ +| E133 (*) | closing bracket is missing indentation | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| **E2** | *Whitespace* | ++------------+----------------------------------------------------------------------+ +| E201 | whitespace after '(' | ++------------+----------------------------------------------------------------------+ +| E202 | whitespace before ')' | ++------------+----------------------------------------------------------------------+ +| E203 | whitespace before ':' | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| E211 | whitespace before '(' | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| E221 | multiple spaces before operator | ++------------+----------------------------------------------------------------------+ +| E222 | multiple spaces after operator | ++------------+----------------------------------------------------------------------+ +| E223 | tab before operator | ++------------+----------------------------------------------------------------------+ +| E224 | tab after operator | ++------------+----------------------------------------------------------------------+ +| E225 | missing whitespace around operator | ++------------+----------------------------------------------------------------------+ +| E226 (*) | missing whitespace around arithmetic operator | ++------------+----------------------------------------------------------------------+ +| E227 | missing whitespace around bitwise or shift operator | ++------------+----------------------------------------------------------------------+ +| E228 | missing whitespace around modulo operator | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| E231 | missing whitespace after ',', ';', or ':' | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| E241 (*) | multiple spaces after ',' | ++------------+----------------------------------------------------------------------+ +| E242 (*) | tab after ',' | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| E251 | unexpected spaces around keyword / parameter equals | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| E261 | at least two spaces before inline comment | ++------------+----------------------------------------------------------------------+ +| E262 | inline comment should start with '# ' | ++------------+----------------------------------------------------------------------+ +| E265 | block comment should start with '# ' | ++------------+----------------------------------------------------------------------+ +| E266 | too many leading '#' for block comment | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| E271 | multiple spaces after keyword | ++------------+----------------------------------------------------------------------+ +| E272 | multiple spaces before keyword | ++------------+----------------------------------------------------------------------+ +| E273 | tab after keyword | ++------------+----------------------------------------------------------------------+ +| E274 | tab before keyword | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| **E3** | *Blank line* | ++------------+----------------------------------------------------------------------+ +| E301 | expected 1 blank line, found 0 | ++------------+----------------------------------------------------------------------+ +| E302 | expected 2 blank lines, found 0 | ++------------+----------------------------------------------------------------------+ +| E303 | too many blank lines (3) | ++------------+----------------------------------------------------------------------+ +| E304 | blank lines found after function decorator | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| **E4** | *Import* | ++------------+----------------------------------------------------------------------+ +| E401 | multiple imports on one line | ++------------+----------------------------------------------------------------------+ +| E402 | module level import not at top of file | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| **E5** | *Line length* | ++------------+----------------------------------------------------------------------+ +| E501 (^) | line too long (82 > 79 characters) | ++------------+----------------------------------------------------------------------+ +| E502 | the backslash is redundant between brackets | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| **E7** | *Statement* | ++------------+----------------------------------------------------------------------+ +| E701 | multiple statements on one line (colon) | ++------------+----------------------------------------------------------------------+ +| E702 | multiple statements on one line (semicolon) | ++------------+----------------------------------------------------------------------+ +| E703 | statement ends with a semicolon | ++------------+----------------------------------------------------------------------+ +| E704 (*) | multiple statements on one line (def) | ++------------+----------------------------------------------------------------------+ +| E711 (^) | comparison to None should be 'if cond is None:' | ++------------+----------------------------------------------------------------------+ +| E712 (^) | comparison to True should be 'if cond is True:' or 'if cond:' | ++------------+----------------------------------------------------------------------+ +| E713 | test for membership should be 'not in' | ++------------+----------------------------------------------------------------------+ +| E714 | test for object identity should be 'is not' | ++------------+----------------------------------------------------------------------+ +| E721 (^) | do not compare types, use 'isinstance()' | ++------------+----------------------------------------------------------------------+ +| E731 | do not assign a lambda expression, use a def | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| **E9** | *Runtime* | ++------------+----------------------------------------------------------------------+ +| E901 | SyntaxError or IndentationError | ++------------+----------------------------------------------------------------------+ +| E902 | IOError | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| **W1** | *Indentation warning* | ++------------+----------------------------------------------------------------------+ +| W191 | indentation contains tabs | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| **W2** | *Whitespace warning* | ++------------+----------------------------------------------------------------------+ +| W291 | trailing whitespace | ++------------+----------------------------------------------------------------------+ +| W292 | no newline at end of file | ++------------+----------------------------------------------------------------------+ +| W293 | blank line contains whitespace | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| **W3** | *Blank line warning* | ++------------+----------------------------------------------------------------------+ +| W391 | blank line at end of file | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| **W5** | *Line break warning* | ++------------+----------------------------------------------------------------------+ +| W503 | line break occurred before a binary operator | ++------------+----------------------------------------------------------------------+ ++------------+----------------------------------------------------------------------+ +| **W6** | *Deprecation warning* | ++------------+----------------------------------------------------------------------+ +| W601 | .has_key() is deprecated, use 'in' | ++------------+----------------------------------------------------------------------+ +| W602 | deprecated form of raising exception | ++------------+----------------------------------------------------------------------+ +| W603 | '<>' is deprecated, use '!=' | ++------------+----------------------------------------------------------------------+ +| W604 | backticks are deprecated, use 'repr()' | ++------------+----------------------------------------------------------------------+ **(*)** In the default configuration, the checks **E121**, **E123**, **E126**, @@ -430,6 +431,6 @@ ``pep8`` and similar tools. It supports plugins. Other tools which use ``pep8`` are referenced in the Wiki: `list of related -tools <https://github.com/jcrocholl/pep8/wiki/RelatedTools>`_. +tools <https://github.com/pycqa/pep8/wiki/RelatedTools>`_. .. _PEP 8: http://www.python.org/dev/peps/pep-0008/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/pep8.egg-info/PKG-INFO new/pep8-1.7.0/pep8.egg-info/PKG-INFO --- old/pep8-1.6.2/pep8.egg-info/PKG-INFO 2015-02-15 23:07:16.000000000 +0100 +++ new/pep8-1.7.0/pep8.egg-info/PKG-INFO 2016-01-12 19:42:59.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pep8 -Version: 1.6.2 +Version: 1.7.0 Summary: Python style guide checker Home-page: http://pep8.readthedocs.org/ Author: Johann C. Rocholl @@ -86,8 +86,8 @@ Links ----- - .. image:: https://api.travis-ci.org/jcrocholl/pep8.png?branch=master - :target: https://travis-ci.org/jcrocholl/pep8 + .. image:: https://api.travis-ci.org/PyCQA/pep8.png?branch=master + :target: https://travis-ci.org/PyCQA/pep8 :alt: Build status .. image:: https://pypip.in/wheel/pep8/badge.png?branch=master @@ -96,13 +96,34 @@ * `Read the documentation <http://pep8.readthedocs.org/>`_ - * `Fork me on GitHub <http://github.com/jcrocholl/pep8>`_ + * `Fork me on GitHub <http://github.com/PyCQA/pep8>`_ Changelog ========= + 1.7.0 (2016-01-12) + ------------------ + + Announcements: + + * Repository moved to PyCQA Organization on GitHub: + https://github.com/pycqa/pep8 + + Changes: + + * Reverted the fix in #368, "options passed on command line are only ones + accepted" feature. This has many unintended consequences in pep8 and flake8 + and needs to be reworked when I have more time. + * Added support for Python 3.5. (Issue #420 & #459) + * Added support for multi-line config_file option parsing. (Issue #429) + * Improved parameter parsing. (Issues #420 & #456) + + Bugs: + + * Fixed BytesWarning on Python 3. (Issue #459) + 1.6.2 (2015-02-15) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/pep8.egg-info/SOURCES.txt new/pep8-1.7.0/pep8.egg-info/SOURCES.txt --- old/pep8-1.6.2/pep8.egg-info/SOURCES.txt 2015-02-15 23:07:16.000000000 +0100 +++ new/pep8-1.7.0/pep8.egg-info/SOURCES.txt 2016-01-12 19:42:59.000000000 +0100 @@ -1,4 +1,5 @@ CHANGES.txt +CONTRIBUTING.rst MANIFEST.in README.rst pep8.py @@ -51,6 +52,7 @@ testsuite/support.py testsuite/test_all.py testsuite/test_api.py +testsuite/test_parser.py testsuite/test_shell.py testsuite/test_util.py testsuite/utf-8-bom.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/pep8.py new/pep8-1.7.0/pep8.py --- old/pep8-1.6.2/pep8.py 2015-02-15 23:05:54.000000000 +0100 +++ new/pep8-1.7.0/pep8.py 2016-01-12 19:40:45.000000000 +0100 @@ -2,7 +2,7 @@ # pep8.py - Check Python source code formatting, according to PEP 8 # Copyright (C) 2006-2009 Johann C. Rocholl <johann@rocholl.net> # Copyright (C) 2009-2014 Florent Xicluna <florent.xicluna@gmail.com> -# Copyright (C) 2014 Ian Lee <ianlee1521@gmail.com> +# Copyright (C) 2014-2016 Ian Lee <ianlee1521@gmail.com> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files @@ -31,7 +31,7 @@ $ python pep8.py -h This program and its regression test suite live here: -http://github.com/jcrocholl/pep8 +https://github.com/pycqa/pep8 Groups of errors and warnings: E errors @@ -62,7 +62,7 @@ except ImportError: from ConfigParser import RawConfigParser -__version__ = '1.6.2' +__version__ = '1.7.0' DEFAULT_EXCLUDE = '.svn,CVS,.bzr,.hg,.git,__pycache__,.tox' DEFAULT_IGNORE = 'E121,E123,E126,E226,E24,E704' @@ -108,7 +108,7 @@ DOCSTRING_REGEX = re.compile(r'u?r?["\']') EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]') WHITESPACE_AFTER_COMMA_REGEX = re.compile(r'[,;:]\s*(?: |\t)') -COMPARE_SINGLETON_REGEX = re.compile(r'\b(None|False|True)?\s*([=!]=)' +COMPARE_SINGLETON_REGEX = re.compile(r'(\bNone|\bFalse|\bTrue)?\s*([=!]=)' r'\s*(?(1)|(None|False|True))\b') COMPARE_NEGATIVE_REGEX = re.compile(r'\b(not)\s+[^][)(}{ ]+\s+(in|is)\s') COMPARE_TYPE_REGEX = re.compile(r'(?:[=!]=|is(?:\s+not)?)\s*type(?:s.\w+Type' @@ -1171,7 +1171,7 @@ ############################################################################## -if '' == ''.encode(): +if sys.version_info < (3,): # Python 2: implicit encoding. def readlines(filename): """Read the source code.""" @@ -1314,6 +1314,16 @@ _checks = {'physical_line': {}, 'logical_line': {}, 'tree': {}} +def _get_parameters(function): + if sys.version_info >= (3, 3): + return [parameter.name + for parameter + in inspect.signature(function).parameters.values() + if parameter.kind == parameter.POSITIONAL_OR_KEYWORD] + else: + return inspect.getargspec(function)[0] + + def register_check(check, codes=None): """Register a new check object.""" def _add_check(check, kind, codes, args): @@ -1322,13 +1332,13 @@ else: _checks[kind][check] = (codes or [''], args) if inspect.isfunction(check): - args = inspect.getargspec(check)[0] + args = _get_parameters(check) if args and args[0] in ('physical_line', 'logical_line'): if codes is None: codes = ERRORCODE_REGEX.findall(check.__doc__ or '') _add_check(check, args[0], codes, args) elif inspect.isclass(check): - if inspect.getargspec(check.__init__)[0][:2] == ['self', 'tree']: + if _get_parameters(check.__init__)[:2] == ['self', 'tree']: _add_check(check, 'tree', codes, None) @@ -1504,7 +1514,7 @@ """Build the file's AST and run all AST checks.""" try: tree = compile(''.join(self.lines), '', 'exec', PyCF_ONLY_AST) - except (SyntaxError, TypeError): + except (ValueError, SyntaxError, TypeError): return self.report_invalid_syntax() for name, cls, __ in self._ast_checks: checker = cls(tree, self.filename) @@ -1955,8 +1965,8 @@ parser.add_option('--format', metavar='format', default='default', help="set the error format [default|pylint|<custom>]") parser.add_option('--diff', action='store_true', - help="report only lines changed according to the " - "unified diff received on STDIN") + help="report changes only within line number ranges in " + "the unified diff received on STDIN") group = parser.add_option_group("Testing Options") if os.path.exists(TESTSUITE_PATH): group.add_option('--testsuite', metavar='dir', @@ -1984,24 +1994,24 @@ local_dir = os.curdir + if USER_CONFIG and os.path.isfile(USER_CONFIG): + if options.verbose: + print('user configuration: %s' % USER_CONFIG) + config.read(USER_CONFIG) + + parent = tail = args and os.path.abspath(os.path.commonprefix(args)) + while tail: + if config.read(os.path.join(parent, fn) for fn in PROJECT_CONFIG): + local_dir = parent + if options.verbose: + print('local configuration: in %s' % parent) + break + (parent, tail) = os.path.split(parent) + if cli_conf and os.path.isfile(cli_conf): if options.verbose: print('cli configuration: %s' % cli_conf) config.read(cli_conf) - else: - if USER_CONFIG and os.path.isfile(USER_CONFIG): - if options.verbose: - print('user configuration: %s' % USER_CONFIG) - config.read(USER_CONFIG) - - parent = tail = args and os.path.abspath(os.path.commonprefix(args)) - while tail: - if config.read(os.path.join(parent, fn) for fn in PROJECT_CONFIG): - local_dir = parent - if options.verbose: - print('local configuration: in %s' % parent) - break - (parent, tail) = os.path.split(parent) pep8_section = parser.prog if config.has_section(pep8_section): @@ -2074,10 +2084,10 @@ options = read_config(options, args, arglist, parser) options.reporter = parse_argv and options.quiet == 1 and FileReport - options.filename = options.filename and options.filename.split(',') + options.filename = _parse_multi_options(options.filename) options.exclude = normalize_paths(options.exclude) - options.select = options.select and options.select.split(',') - options.ignore = options.ignore and options.ignore.split(',') + options.select = _parse_multi_options(options.select) + options.ignore = _parse_multi_options(options.ignore) if options.diff: options.reporter = DiffReport @@ -2088,6 +2098,22 @@ return options, args +def _parse_multi_options(options, split_token=','): + r"""Split and strip and discard empties. + + Turns the following: + + A, + B, + + into ["A", "B"] + """ + if options: + return [o.strip() for o in options.split(split_token) if o.strip()] + else: + return options + + def _main(): """Parse options and run checks on Python source.""" import signal @@ -2100,17 +2126,22 @@ pep8style = StyleGuide(parse_argv=True) options = pep8style.options + if options.doctest or options.testsuite: from testsuite.support import run_tests report = run_tests(pep8style) else: report = pep8style.check_files() + if options.statistics: report.print_statistics() + if options.benchmark: report.print_benchmark() + if options.testsuite and not options.quiet: report.print_results() + if report.total_errors: if options.count: sys.stderr.write(str(report.total_errors) + '\n') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/testsuite/E71.py new/pep8-1.7.0/testsuite/E71.py --- old/pep8-1.6.2/testsuite/E71.py 2015-01-01 02:17:54.000000000 +0100 +++ new/pep8-1.7.0/testsuite/E71.py 2015-10-25 18:12:14.000000000 +0100 @@ -10,6 +10,18 @@ #: E711 if None != res: pass +#: E711 +if res[1] == None: + pass +#: E711 +if res[1] != None: + pass +#: E711 +if None != res[1]: + pass +#: E711 +if None == res[1]: + pass # #: E712 @@ -24,6 +36,12 @@ #: E712 if False == res: pass +#: E712 +if res[1] == True: + pass +#: E712 +if res[1] != False: + pass # #: E713 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/testsuite/test_all.py new/pep8-1.7.0/testsuite/test_all.py --- old/pep8-1.6.2/testsuite/test_all.py 2015-01-01 02:17:54.000000000 +0100 +++ new/pep8-1.7.0/testsuite/test_all.py 2015-09-08 00:50:03.000000000 +0200 @@ -46,11 +46,12 @@ def suite(): - from testsuite import test_api, test_shell, test_util + from testsuite import test_api, test_parser, test_shell, test_util suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(Pep8TestCase)) suite.addTest(unittest.makeSuite(test_api.APITestCase)) + suite.addTest(unittest.makeSuite(test_parser.ParserTestCase)) suite.addTest(unittest.makeSuite(test_shell.ShellTestCase)) suite.addTest(unittest.makeSuite(test_util.UtilTestCase)) return suite diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/testsuite/test_api.py new/pep8-1.7.0/testsuite/test_api.py --- old/pep8-1.6.2/testsuite/test_api.py 2015-01-27 17:16:12.000000000 +0100 +++ new/pep8-1.7.0/testsuite/test_api.py 2015-09-07 08:38:04.000000000 +0200 @@ -339,6 +339,9 @@ if 'SyntaxError' in stdout: # PyPy 2.2 returns a SyntaxError expected = "stdin:1:2: E901 SyntaxError" + elif 'ValueError' in stdout: + # Python 3.5. + expected = "stdin:1:1: E901 ValueError" else: expected = "stdin:1:1: E901 TypeError" self.assertTrue(stdout.startswith(expected), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pep8-1.6.2/testsuite/test_parser.py new/pep8-1.7.0/testsuite/test_parser.py --- old/pep8-1.6.2/testsuite/test_parser.py 1970-01-01 01:00:00.000000000 +0100 +++ new/pep8-1.7.0/testsuite/test_parser.py 2015-09-08 00:50:03.000000000 +0200 @@ -0,0 +1,61 @@ +import os +import tempfile +import unittest + +import pep8 + + +def _process_file(contents): + with tempfile.NamedTemporaryFile(delete=False) as f: + f.write(contents) + + options, args = pep8.process_options(config_file=f.name) + os.remove(f.name) + + return options, args + + +class ParserTestCase(unittest.TestCase): + + def test_vanilla_ignore_parsing(self): + contents = b""" +[pep8] +ignore = E226,E24 + """ + options, args = _process_file(contents) + + self.assertEqual(options.ignore, ["E226", "E24"]) + + def test_multiline_ignore_parsing(self): + contents = b""" +[pep8] +ignore = + E226, + E24 + """ + + options, args = _process_file(contents) + + self.assertEqual(options.ignore, ["E226", "E24"]) + + def test_trailing_comma_ignore_parsing(self): + contents = b""" +[pep8] +ignore = E226, + """ + + options, args = _process_file(contents) + + self.assertEqual(options.ignore, ["E226"]) + + def test_multiline_trailing_comma_ignore_parsing(self): + contents = b""" +[pep8] +ignore = + E226, + E24, + """ + + options, args = _process_file(contents) + + self.assertEqual(options.ignore, ["E226", "E24"])
participants (1)
-
root@hilbert.suse.de