Skip to content

Commit

Permalink
Merge latest master into issue-314
Browse files Browse the repository at this point in the history
  • Loading branch information
arthall committed Jun 2, 2016
2 parents bbefb19 + fd4f1c2 commit 5cf3c7a
Show file tree
Hide file tree
Showing 30 changed files with 968 additions and 516 deletions.
18 changes: 11 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
language: python
sudo: false
python:
- 2.6
- 2.7
- 3.2
- 3.3
- 3.4
- 3.5
- nightly
- pypy
- pypy3
install:
- pip install -e .
- pip list
script:
- python pep8.py --testsuite testsuite
- python pep8.py --statistics pep8.py
- python pep8.py --doctest
- python pycodestyle.py --testsuite testsuite
- python pycodestyle.py --statistics pycodestyle.py
- python pycodestyle.py --doctest
- python setup.py test
matrix:
allow_failures:
- python: pypy
- python: pypy3

notifications:
email:
- [email protected]
irc:
channels:
- "irc.freenode.org##python-code-quality"
use_notice: true
skip_join: true
91 changes: 85 additions & 6 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,73 @@ Changelog
=========


1.x (unreleased)
----------------
2.0.0 (2016-05-31)
------------------

Announcements:

* Repository renamed to `pycodestyle`; Issue #466 / #481.
* Added joint Code of Conduct as member of PyCQA; #483

Changes:

* Added tox test support for Python 3.5 and pypy3
* Added check E275 for whitespace on `from ... import ...` lines; #489 / #491
* Added W503 to the list of codes ignored by default ignore list; #498
* Removed use of project level `.pep8` configuration file; #364

Bugs:

* Fixed bug with treating `~` operator as binary; #383 / #384
* Identify binary operators as unary; #484 / #485

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)
------------------

Changes:

* Added check for breaking around a binary operator. (Issue #197, Pull #305)

Bugs:

* Restored config_file parameter in process_options(). (Issue #380)


1.6.1 (2015-02-08)
------------------

Changes:

* Assign variables before referenced. (Issue #287)

Bugs:

* Exception thrown due to unassigned ``local_dir`` variable. (Issue #377)


1.6.0 (2015-02-06)
------------------

News:

Expand Down Expand Up @@ -32,6 +97,15 @@ Changes:

* Add ``.tox/`` to default excludes. (Issue #335)

* Do not report E121 or E126 in the default configuration. (Issues #256 / #316)

* Allow spaces around the equals sign in an annotated function. (Issue #357)

* Allow trailing backslash if in an inline comment. (Issue #374)

* If ``--config`` is used, only that configuration is processed. Otherwise,
merge the user and local configurations are merged. (Issue #368 / #369)

Bug fixes:

* Don't crash if Checker.build_tokens_line() returns None. (Issue #306)
Expand All @@ -43,6 +117,11 @@ Bug fixes:

* Fix false positive E711/E712/E713. (Issues #330 and #336)

* Do not skip physical checks if the newline is escaped. (Issue #319)

* Flush sys.stdout to avoid race conditions with printing. See flake8 bug:
https://gitlab.com/pycqa/flake8/issues/17 for more details. (Issue #363)


1.5.7 (2014-05-29)
------------------
Expand Down Expand Up @@ -274,7 +353,7 @@ Bug fixes:

* Initiate a graceful shutdown on ``Control+C``.

* Allow to change the ``checker_class`` for the ``StyleGuide``.
* Allow changing the ``checker_class`` for the ``StyleGuide``.


1.4.2 (2013-02-10)
Expand All @@ -284,7 +363,7 @@ Bug fixes:

* Register new checkers with ``register_check(func_or_cls, codes)``.

* Allow to construct a ``StyleGuide`` with a custom parser.
* Allow constructing a ``StyleGuide`` with a custom parser.

* Accept visual indentation without parenthesis after the ``if``
statement. (Issue #151)
Expand Down Expand Up @@ -330,7 +409,7 @@ Bug fixes:
(Issue #93 and #141)

* Add the Sphinx-based documentation, and publish it
on http://pep8.readthedocs.org/. (Issue #105)
on https://pycodestyle.readthedocs.io/. (Issue #105)


1.3.4 (2012-12-18)
Expand Down Expand Up @@ -493,7 +572,7 @@ Bug fixes:
The ``--repeat`` flag becomes obsolete because it is the default
behaviour. (Issue #6)

* Allow to specify ``--max-line-length``. (Issue #36)
* Allow specifying ``--max-line-length``. (Issue #36)

* Make the shebang more flexible. (Issue #26)

Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Contributing to ``pycodestyle``
===============================

Please see the `developer notes <https://pycodestyle.readthedocs.io/en/latest/developer.html>`_
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Copyright © 2006-2009 Johann C. Rocholl <[email protected]>
Copyright © 2009-2014 Florent Xicluna <[email protected]>
Copyright © 2014-2016 Ian Lee <[email protected]>

Licensed under the terms of the Expat License

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
test :
python pep8.py --testsuite testsuite
python pycodestyle.py --testsuite testsuite

selftest :
python pep8.py --statistics pep8.py
python pycodestyle.py --statistics pycodestyle.py

doctest :
python pep8.py --doctest
python pycodestyle.py --doctest

unittest :
python -m testsuite.test_all
Expand Down
41 changes: 23 additions & 18 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
pep8 - Python style guide checker
=================================
pycodestyle (formerly called pep8) - Python style guide checker
===============================================================

pep8 is a tool to check your Python code against some of the style
pycodestyle is a tool to check your Python code against some of the style
conventions in `PEP 8`_.

.. _PEP 8: http://www.python.org/dev/peps/pep-0008/

.. note::

This package used to be called ``pep8`` but was renamed to ``pycodestyle``
to reduce confusion. Further discussion `here
<https://github.com/PyCQA/pycodestyle/issues/466>`_.

Features
--------
Expand All @@ -15,18 +20,18 @@ Features
* Parseable output: Jump to error location in your editor.

* Small: Just one Python file, requires only stdlib. You can use just
the pep8.py file for this purpose.
the ``pycodestyle.py`` file for this purpose.

* Comes with a comprehensive test suite.

Installation
------------

You can install, upgrade, uninstall pep8.py with these commands::
You can install, upgrade, uninstall ``pycodestyle.py`` with these commands::

$ pip install pep8
$ pip install --upgrade pep8
$ pip uninstall pep8
$ pip install pycodestyle
$ pip install --upgrade pycodestyle
$ pip uninstall pycodestyle

There's also a package for Debian/Ubuntu, but it's not always the
latest version.
Expand All @@ -36,7 +41,7 @@ Example usage and output

::

$ pep8 --first optparse.py
$ pycodestyle --first optparse.py
optparse.py:69:11: E401 multiple imports on one line
optparse.py:77:1: E302 expected 2 blank lines, found 1
optparse.py:88:5: E301 expected 1 blank line, found 0
Expand All @@ -46,10 +51,10 @@ Example usage and output
optparse.py:472:29: E221 multiple spaces before operator
optparse.py:544:21: W601 .has_key() is deprecated, use 'in'

You can also make pep8.py show the source code for each error, and
You can also make ``pycodestyle.py`` show the source code for each error, and
even the relevant text from PEP 8::

$ pep8 --show-source --show-pep8 testsuite/E40.py
$ pycodestyle --show-source --show-pep8 testsuite/E40.py
testsuite/E40.py:2:10: E401 multiple imports on one line
import os, sys
^
Expand All @@ -61,7 +66,7 @@ even the relevant text from PEP 8::

Or you can display how often each error was found::

$ pep8 --statistics -qq Python-2.5/Lib
$ pycodestyle --statistics -qq Python-2.5/Lib
232 E201 whitespace after '['
599 E202 whitespace before ')'
631 E203 whitespace before ','
Expand All @@ -78,14 +83,14 @@ Or you can display how often each error was found::
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/pycodestyle.png?branch=master
:target: https://travis-ci.org/PyCQA/pycodestyle
:alt: Build status

.. image:: https://pypip.in/wheel/pep8/badge.png?branch=master
:target: https://pypi.python.org/pypi/pep8
.. image:: https://pypip.in/wheel/pycodestyle/badge.png?branch=master
:target: https://pypi.python.org/pypi/pycodestyle
:alt: Wheel Status

* `Read the documentation <http://pep8.readthedocs.org/>`_
* `Read the documentation <https://pycodestyle.readthedocs.io/>`_

* `Fork me on GitHub <http://github.com/jcrocholl/pep8>`_
* `Fork me on GitHub <http://github.com/PyCQA/pycodestyle>`_
8 changes: 4 additions & 4 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ qthelp:
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pep8.qhcp"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pycodestyle.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pep8.qhc"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pycodestyle.qhc"

devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/pep8"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pep8"
@echo "# mkdir -p $$HOME/.local/share/devhelp/pycodestyle"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pycodestyle"
@echo "# devhelp"

epub:
Expand Down
Loading

0 comments on commit 5cf3c7a

Please sign in to comment.