summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.rst4
-rw-r--r--docs/Makefile8
-rw-r--r--docs/advanced.rst26
-rw-r--r--docs/api.rst10
-rw-r--r--docs/conf.py20
-rw-r--r--docs/developer.rst18
-rw-r--r--docs/index.rst12
-rw-r--r--docs/intro.rst48
-rw-r--r--docs/make.bat4
9 files changed, 73 insertions, 77 deletions
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 61c2822..9771176 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -1,4 +1,4 @@
-Contributing to ``pep8``
-========================
+Contributing to ``pycodestyle``
+===============================
Please see the `developer notes <https://pycodestyle.readthedocs.io/en/latest/developer.html>`_
diff --git a/docs/Makefile b/docs/Makefile
index 1952db4..96c920f 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -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:
diff --git a/docs/advanced.rst b/docs/advanced.rst
index 4f72e6e..6adb2cb 100644
--- a/docs/advanced.rst
+++ b/docs/advanced.rst
@@ -1,4 +1,4 @@
-.. currentmodule:: pep8
+.. currentmodule:: pycodestyle
==============
Advanced usage
@@ -8,7 +8,7 @@ Advanced usage
Automated tests
---------------
-You can also execute ``pep8`` tests from Python code. For example, this
+You can also execute ``pycodestyle`` tests from Python code. For example, this
can be highly useful for automated testing of coding style conformance
in your project::
@@ -18,10 +18,10 @@ in your project::
class TestCodeFormat(unittest.TestCase):
- def test_pep8_conformance(self):
- """Test that we conform to PEP8."""
- pep8style = pycodestyle.StyleGuide(quiet=True)
- result = pep8style.check_files(['file1.py', 'file2.py'])
+ def test_conformance(self):
+ """Test that we conform to PEP-8."""
+ style = pycodestyle.StyleGuide(quiet=True)
+ result = style.check_files(['file1.py', 'file2.py'])
self.assertEqual(result.total_errors, 0,
"Found code style errors (and warnings).")
@@ -41,18 +41,18 @@ There's also a shortcut for checking a single file::
Configuring tests
-----------------
-You can configure automated ``pep8`` tests in a variety of ways.
+You can configure automated ``pycodestyle`` tests in a variety of ways.
-For example, you can pass in a path to a configuration file that ``pep8``
+For example, you can pass in a path to a configuration file that ``pycodestyle``
should use::
import pycodestyle
- pep8style = pycodestyle.StyleGuide(config_file='/path/to/tox.ini')
+ style = pycodestyle.StyleGuide(config_file='/path/to/tox.ini')
You can also set specific options explicitly::
- pep8style = pycodestyle.StyleGuide(ignore=['E501'])
+ style = pycodestyle.StyleGuide(ignore=['E501'])
Skip file header
@@ -81,8 +81,8 @@ through a custom wrapper for the PEP 8 library::
filename, lines=lines, expected=expected, line_offset=line_offset)
if __name__ == '__main__':
- pep8style = PEP8(parse_argv=True, config_file=True)
- report = pep8style.check_files()
+ style = PEP8(parse_argv=True, config_file=True)
+ report = style.check_files()
if report.total_errors:
raise SystemExit(1)
@@ -91,4 +91,4 @@ and 20 lines at the end. If there's no line to skip at the end, it could be
changed with ``LINES_SLICE = slice(14, None)`` for example.
You can save it in a file and use it with the same options as the
-original ``pep8``.
+original ``pycodestyle``.
diff --git a/docs/api.rst b/docs/api.rst
index b346aba..f9c7066 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -1,8 +1,8 @@
-========
-pep8 API
-========
+===============
+pycodestyle API
+===============
-.. module:: pep8
+.. module:: pycodestyle
The library provides classes which are usable by third party tools.
@@ -84,5 +84,5 @@ Utilities
.. autofunction:: stdin_get_value()
.. autofunction:: parse_udiff(diff, patterns=None, parent='.')
.. autofunction:: filename_match(filename, patterns, default=True)
- .. autofunction:: get_parser(prog='pep8', version=pep8.__version__)
+ .. autofunction:: get_parser(prog='pycodestyle', version=pycodestyle.__version__)
.. autofunction:: init_checks_registry()
diff --git a/docs/conf.py b/docs/conf.py
index 5f990f3..7935b0b 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# pep8 documentation build configuration file, created by
+# pycodestyle documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 21 09:47:49 2012.
#
# This file is execfile()d with the current directory set to its
@@ -44,7 +44,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-project = u'pep8'
+project = u'pycodestyle'
authors = u'Johann C. Rocholl, Florent Xicluna, Ian Lee'
copyright = u'2006-2016, %s' % (authors)
@@ -53,11 +53,11 @@ copyright = u'2006-2016, %s' % (authors)
# built documents.
#
-pep8_version = __import__('pep8').__version__.split('.')
+pkg_version = __import__('pycodestyle').__version__.split('.')
# The short X.Y version.
-version = '.'.join(pep8_version[:2])
+version = '.'.join(pkg_version[:2])
# The full version, including alpha/beta/rc tags.
-release = '.'.join(pep8_version)
+release = '.'.join(pkg_version)
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -176,7 +176,7 @@ if not on_rtd: # only import and set the theme if we're building docs locally
#html_file_suffix = None
# Output file base name for HTML help builder.
-htmlhelp_basename = 'pep8doc'
+htmlhelp_basename = 'pycodestyledoc'
# -- Options for LaTeX output -------------------------------------------------
@@ -196,7 +196,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'pep8.tex', u'pep8 documentation',
+ ('index', 'pycodestyle.tex', u'pycodestyle documentation',
authors, 'manual'),
]
@@ -226,7 +226,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- ('index', 'pep8', u'pep8 documentation',
+ ('index', 'pycodestyle', u'pycodestyle documentation',
[authors], 1)
]
@@ -240,8 +240,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- ('index', 'pep8', u'pep8 documentation', authors,
- 'pep8', 'One line description of project.',
+ ('index', 'pycodestyle', u'pycodestyle documentation', authors,
+ 'pycodestyle', 'One line description of project.',
'Miscellaneous'),
]
diff --git a/docs/developer.rst b/docs/developer.rst
index bbafb80..0aefbed 100644
--- a/docs/developer.rst
+++ b/docs/developer.rst
@@ -1,4 +1,4 @@
-.. currentmodule:: pep8
+.. currentmodule:: pycodestyle
=================
Developer's notes
@@ -13,7 +13,7 @@ conditions of the :ref:`Expat license <license>`. Fork away!
* `Source code <https://github.com/pycqa/pycodestyle>`_ and
`issue tracker <https://github.com/pycqa/pycodestyle/issues>`_ on GitHub.
-* `Continuous tests <http://travis-ci.org/pycqa/pep8>`_ against Python
+* `Continuous tests <http://travis-ci.org/pycqa/pycodestyle>`_ against Python
2.6 through 3.4 and PyPy, on `Travis-CI platform
<http://about.travis-ci.org/>`_.
@@ -25,14 +25,14 @@ Direction
Some high-level aims and directions to bear in mind for contributions:
-* ``pep8`` is intended to be as fast as possible.
+* ``pycodestyle`` 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.
+ ``pycodestyle`` doesn't want or need a plugin architecture.
* Python 2.6 support is still deemed important.
-* ``pep8`` aims to have no external dependencies.
+* ``pycodestyle`` aims to have no external dependencies.
Contribute
@@ -89,7 +89,7 @@ Several docstrings contain examples directly from the `PEP 8`_ document.
Okay: spam(ham[1], {eggs: 2})
E201: spam( ham[1], {eggs: 2})
-These examples are verified automatically when pep8.py is run with the
+These examples are verified automatically when pycodestyle.py is run with the
``--doctest`` option. You can add examples for your own check functions.
The format is simple: ``"Okay"`` or error/warning code followed by colon
and space, the rest of the line is example source code. If you put ``'r'``
@@ -97,9 +97,9 @@ before the docstring, you can use ``\n`` for newline and ``\t`` for tab.
Then be sure to pass the tests::
- $ python pep8.py --testsuite testsuite
- $ python pep8.py --doctest
- $ python pep8.py --verbose pep8.py
+ $ python pycodestyle.py --testsuite testsuite
+ $ python pycodestyle.py --doctest
+ $ python pycodestyle.py --verbose pycodestyle.py
When contributing to pycodestyle, please observe our `Code of Conduct`_.
diff --git a/docs/index.rst b/docs/index.rst
index d6ece44..0764e9f 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,12 +1,12 @@
-.. pep8 documentation master file
+.. pycodestyle documentation master file
-pep8's documentation
-====================
+pycodestyle's documentation
+===========================
*Python style guide checker*
-pep8 is a tool to check your Python code against some of the style
-conventions in `PEP 8`_.
+pycodestyle (formerly pep8) 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/
@@ -45,7 +45,7 @@ Maintained by Florent Xicluna and Ian Lee.
License
=======
-The ``pep8`` library is provided under the terms and conditions of the
+The ``pycodestyle`` library is provided under the terms and conditions of the
Expat license::
# Permission is hereby granted, free of charge, to any person
diff --git a/docs/intro.rst b/docs/intro.rst
index 91cfbfe..2281ef1 100644
--- a/docs/intro.rst
+++ b/docs/intro.rst
@@ -1,9 +1,9 @@
-.. currentmodule:: pep8
+.. currentmodule:: pycodestyle
Introduction
============
-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`_.
.. contents::
@@ -18,7 +18,7 @@ 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.
@@ -40,7 +40,7 @@ Always remember this statement from `PEP 8`_:
Among other things, these features are currently not in the scope of
-the ``pep8`` library:
+the ``pycodestyle`` library:
* **naming conventions**: this kind of feature is supported through plugins.
Install `flake8 <https://pypi.python.org/pypi/flake8>`_ and the
@@ -55,16 +55,11 @@ the ``pep8`` library:
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
-
-There's also a package for Debian/Ubuntu, but it's not always the
-latest version::
-
- $ sudo apt-get install pep8
+ $ pip install pycodestyle
+ $ pip install --upgrade pycodestyle
+ $ pip uninstall pycodestyle
Example usage and output
@@ -72,7 +67,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
@@ -82,10 +77,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
^
@@ -97,7 +92,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 ','
@@ -111,15 +106,16 @@ Or you can display how often each error was found::
612 W601 .has_key() is deprecated, use 'in'
1188 W602 deprecated form of raising exception
-You can also make pep8.py show the error text in different formats by using --format having options default/pylint/custom::
+You can also make pycodestyle.py show the error text in different formats by
+using --format having options default/pylint/custom::
- $ pep8 testsuite/E40.py --format=default
+ $ pycodestyle testsuite/E40.py --format=default
testsuite/E40.py:2:10: E401 multiple imports on one line
- $ pep8 testsuite/E40.py --format=pylint
+ $ pycodestyle testsuite/E40.py --format=pylint
testsuite/E40.py:2: [E401] multiple imports on one line
- $ pep8 testsuite/E40.py --format='%(path)s|%(row)d|%(col)d| %(code)s %(text)s'
+ $ pycodestyle testsuite/E40.py --format='%(path)s|%(row)d|%(col)d| %(code)s %(text)s'
testsuite/E40.py|2|10| E401 multiple imports on one line
Variables in the ``custom`` format option
@@ -140,8 +136,8 @@ Variables in the ``custom`` format option
Quick help is available on the command line::
- $ pep8 -h
- Usage: pep8 [options] input ...
+ $ pycodestyle -h
+ Usage: pycodestyle [options] input ...
Options:
--version show program's version number and exit
@@ -421,7 +417,7 @@ special comment. This possibility should be reserved for special cases.
Note: most errors can be listed with such one-liner::
- $ python pep8.py --first --select E,W testsuite/ --format '%(code)s: %(text)s'
+ $ python pycodestyle.py --first --select E,W testsuite/ --format '%(code)s: %(text)s'
.. _related-tools:
@@ -430,9 +426,9 @@ Related tools
-------------
The `flake8 checker <https://flake8.readthedocs.io>`_ is a wrapper around
-``pep8`` and similar tools. It supports plugins.
+``pycodestyle`` and similar tools. It supports plugins.
-Other tools which use ``pep8`` are referenced in the Wiki: `list of related
+Other tools which use ``pycodestyle`` are referenced in the Wiki: `list of related
tools <https://github.com/pycqa/pycodestyle/wiki/RelatedTools>`_.
.. _PEP 8: http://www.python.org/dev/peps/pep-0008/
diff --git a/docs/make.bat b/docs/make.bat
index efa0e94..1ecae62 100644
--- a/docs/make.bat
+++ b/docs/make.bat
@@ -99,9 +99,9 @@ if "%1" == "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.ghc
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\pycodestyle.ghc
goto end
)