[Python-modules-commits] [python-flake8] 01/09: Import python-flake8_3.2.0.orig.tar.gz
Ondřej Nový
onovy at moszumanska.debian.org
Thu Nov 17 13:48:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
onovy pushed a commit to branch master
in repository python-flake8.
commit c959f8a48c6ec635e8cb8d443d232003265a750e
Author: Ondřej Nový <onovy at debian.org>
Date: Thu Nov 17 14:20:19 2016 +0100
Import python-flake8_3.2.0.orig.tar.gz
---
CONTRIBUTING.rst | 2 +-
MANIFEST.in | 1 +
PKG-INFO | 4 +-
README.rst | 2 +-
docs/source/conf.py | 2 +-
docs/source/index.rst | 1 +
docs/source/internal/cli.rst | 2 +-
docs/source/internal/contributing.rst | 2 +-
docs/source/internal/option_handling.rst | 2 +-
docs/source/manpage.rst | 150 ++++++++++++
.../plugin-development/plugin-parameters.rst | 23 +-
docs/source/release-notes/3.0.0.rst | 14 ++
docs/source/release-notes/3.1.0.rst | 80 +++++++
docs/source/release-notes/3.1.1.rst | 18 ++
docs/source/release-notes/3.2.0.rst | 13 +
docs/source/release-notes/index.rst | 21 ++
docs/source/user/configuration.rst | 7 +-
docs/source/user/error-codes.rst | 3 +
docs/source/user/index.rst | 1 +
docs/source/user/invocation.rst | 1 +
docs/source/user/options.rst | 68 ++++++
docs/source/user/using-hooks.rst | 69 ++++++
pytest.ini | 3 +
setup.cfg | 8 +-
setup.py | 5 +-
src/flake8.egg-info/PKG-INFO | 4 +-
src/flake8.egg-info/SOURCES.txt | 261 ++-------------------
src/flake8.egg-info/requires.txt | 4 +-
src/flake8/__init__.py | 2 +-
src/flake8/api/legacy.py | 2 +-
src/flake8/checker.py | 43 +++-
src/flake8/formatting/base.py | 2 +-
src/flake8/formatting/default.py | 8 +
src/flake8/main/application.py | 10 +-
src/flake8/main/debug.py | 62 +++++
src/flake8/main/git.py | 26 +-
src/flake8/main/options.py | 17 ++
src/flake8/options/manager.py | 5 +-
src/flake8/plugins/manager.py | 11 +-
src/flake8/plugins/pyflakes.py | 2 +
src/flake8/processor.py | 28 ++-
src/flake8/style_guide.py | 47 ++--
tests/fixtures/example-code/invalid-syntax.py | 1 +
tests/unit/test_application.py | 62 +++++
tests/unit/test_base_formatter.py | 18 +-
tests/unit/test_debug.py | 86 +++++++
tests/unit/test_file_checker.py | 25 ++
tests/unit/test_file_processor.py | 12 +
tests/unit/test_filenameonly_formatter.py | 38 +++
tests/unit/test_git.py | 29 +++
tests/unit/test_nothing_formatter.py | 28 +++
tests/unit/test_plugin.py | 25 ++
tests/unit/test_style_guide.py | 56 +++--
tox.ini | 159 +++++++++++++
54 files changed, 1236 insertions(+), 339 deletions(-)
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 29afc6a..27607bc 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -6,7 +6,7 @@ There are many ways to contriubte to |Flake8|, and we encourage them all:
- contributing bug reports and feature requests
-- contributing documenation (and yes that includes this document)
+- contributing documentation (and yes that includes this document)
- reviewing and triaging bugs and merge requests
diff --git a/MANIFEST.in b/MANIFEST.in
index 96b10e7..74b090b 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,6 +1,7 @@
include *.rst
include CONTRIBUTORS.txt
include LICENSE
+include *.ini
global-exclude *.pyc
recursive-include docs *.rst *.py
recursive-include tests *.py *.ini *.rst *_diff
diff --git a/PKG-INFO b/PKG-INFO
index 578a535..f2689e9 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: flake8
-Version: 3.0.4
+Version: 3.2.0
Summary: the modular source code checker: pep8, pyflakes and co
Home-page: https://gitlab.com/pycqa/flake8
Author: Ian Cordasco
@@ -61,7 +61,7 @@ Description: ========
Links
=====
- * `Flake8 Documentation <https://flake8.pycqa.org/en/latest/>`_
+ * `Flake8 Documentation <http://flake8.pycqa.org/en/latest/>`_
* `GitLab Project <https://gitlab.com/pycqa/flake8>`_
diff --git a/README.rst b/README.rst
index d9a795b..f6237aa 100644
--- a/README.rst
+++ b/README.rst
@@ -53,7 +53,7 @@ to suggest, the mailing list would be the best place for it.
Links
=====
-* `Flake8 Documentation <https://flake8.pycqa.org/en/latest/>`_
+* `Flake8 Documentation <http://flake8.pycqa.org/en/latest/>`_
* `GitLab Project <https://gitlab.com/pycqa/flake8>`_
diff --git a/docs/source/conf.py b/docs/source/conf.py
index c7a0fd0..0c0b8de 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -264,7 +264,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- (master_doc, 'flake8', u'flake8 Documentation',
+ ('manpage', 'flake8', u'Flake8 Command Line Documentation',
[author], 1)
]
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 51b0189..9488985 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -89,6 +89,7 @@ and how to specify them on the command-line or in configuration files.
:maxdepth: 2
user/index
+ Flake8 man page <manpage>
Plugin Developer Guide
======================
diff --git a/docs/source/internal/cli.rst b/docs/source/internal/cli.rst
index f203125..cbb1fef 100644
--- a/docs/source/internal/cli.rst
+++ b/docs/source/internal/cli.rst
@@ -6,7 +6,7 @@ The command line interface of |Flake8| is modeled as an application via
command line, :func:`~flake8.main.cli.main` is run which handles
management of the application.
-User input is parsed *twice* to accomodate logging and verbosity options
+User input is parsed *twice* to accommodate logging and verbosity options
passed by the user as early as possible.
This is so as much logging can be produced as possible.
diff --git a/docs/source/internal/contributing.rst b/docs/source/internal/contributing.rst
index 29afc6a..27607bc 100644
--- a/docs/source/internal/contributing.rst
+++ b/docs/source/internal/contributing.rst
@@ -6,7 +6,7 @@ There are many ways to contriubte to |Flake8|, and we encourage them all:
- contributing bug reports and feature requests
-- contributing documenation (and yes that includes this document)
+- contributing documentation (and yes that includes this document)
- reviewing and triaging bugs and merge requests
diff --git a/docs/source/internal/option_handling.rst b/docs/source/internal/option_handling.rst
index 74ecb76..86b7021 100644
--- a/docs/source/internal/option_handling.rst
+++ b/docs/source/internal/option_handling.rst
@@ -166,7 +166,7 @@ Configuration file discovery is managed by the
:class:`~flake8.options.config.ConfigFileFinder` object. This object needs to
know information about the program's name, any extra arguments passed to it,
and any configuration files that should be appended to the list of discovered
-files. It provides methods for finding the files and similiar methods for
+files. It provides methods for finding the files and similar methods for
parsing those fles. For example, it provides
:meth:`~flake8.options.config.ConfigFileFinder.local_config_files` to find
known local config files (and append the extra configuration files) and it
diff --git a/docs/source/manpage.rst b/docs/source/manpage.rst
new file mode 100644
index 0000000..4988de4
--- /dev/null
+++ b/docs/source/manpage.rst
@@ -0,0 +1,150 @@
+========
+ flake8
+========
+
+SYNOPSIS
+========
+
+.. code::
+
+ flake8 [options] [<path> <path> ...]
+
+ flake8 --help
+
+DESCRIPTION
+===========
+
+``flake8`` is a command-line utility for enforcing style consistency across
+Python projects. By default it includes lint checks provided by the PyFlakes
+project, PEP-0008 inspired style checks provided by the PyCodeStyle project,
+and McCabe complexity checking provided by the McCabe project. It will also
+run third-party extensions if they are found and installed.
+
+OPTIONS
+=======
+
+It is important to note that third-party extensions may add options which are
+not represented here. To see all options available in your installation, run::
+
+ flake8 --help
+
+All options available as of Flake8 3.1.0::
+
+ --version show program's version number and exit
+ -h, --help show this help message and exit
+ -v, --verbose Print more information about what is happening in
+ flake8. This option is repeatable and will increase
+ verbosity each time it is repeated.
+ -q, --quiet Report only file names, or nothing. This option is
+ repeatable.
+ --count Print total number of errors and warnings to standard
+ error and set the exit code to 1 if total is not
+ empty.
+ --diff Report changes only within line number ranges in the
+ unified diff provided on standard in by the user.
+ --exclude=patterns Comma-separated list of files or directories to
+ exclude. (Default:
+ .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg)
+ --filename=patterns Only check for filenames matching the patterns in this
+ comma-separated list. (Default: *.py)
+ --stdin-display-name=STDIN_DISPLAY_NAME
+ The name used when reporting errors from code passed
+ via stdin. This is useful for editors piping the file
+ contents to flake8. (Default: stdin)
+ --format=format Format errors according to the chosen formatter.
+ --hang-closing Hang closing bracket instead of matching indentation
+ of opening bracket's line.
+ --ignore=errors Comma-separated list of errors and warnings to ignore
+ (or skip). For example, ``--ignore=E4,E51,W234``.
+ (Default: E121,E123,E126,E226,E24,E704,W503,W504)
+ --max-line-length=n Maximum allowed line length for the entirety of this
+ run. (Default: 79)
+ --select=errors Comma-separated list of errors and warnings to enable.
+ For example, ``--select=E4,E51,W234``. (Default:
+ E,F,W,C90)
+ --disable-noqa Disable the effect of "# noqa". This will report
+ errors on lines with "# noqa" at the end.
+ --show-source Show the source generate each error or warning.
+ --statistics Count errors and warnings.
+ --enable-extensions=ENABLE_EXTENSIONS
+ Enable plugins and extensions that are otherwise
+ disabled by default
+ --exit-zero Exit with status code "0" even if there are errors.
+ --install-hook=INSTALL_HOOK
+ Install a hook that is run prior to a commit for the
+ supported version control systema.
+ -j JOBS, --jobs=JOBS Number of subprocesses to use to run checks in
+ parallel. This is ignored on Windows. The default,
+ "auto", will auto-detect the number of processors
+ available to use. (Default: auto)
+ --output-file=OUTPUT_FILE
+ Redirect report to a file.
+ --tee Write to stdout and output-file.
+ --append-config=APPEND_CONFIG
+ Provide extra config files to parse in addition to the
+ files found by Flake8 by default. These files are the
+ last ones read and so they take the highest precedence
+ when multiple files provide the same option.
+ --config=CONFIG Path to the config file that will be the authoritative
+ config source. This will cause Flake8 to ignore all
+ other configuration files.
+ --isolated Ignore all found configuration files.
+ --benchmark Print benchmark information about this run of Flake8
+ --bug-report Print information necessary when preparing a bug
+ report
+ --builtins=BUILTINS define more built-ins, comma separated
+ --doctests check syntax of the doctests
+ --include-in-doctest=INCLUDE_IN_DOCTEST
+ Run doctests only on these files
+ --exclude-from-doctest=EXCLUDE_FROM_DOCTEST
+ Skip these files when running doctests
+ --max-complexity=MAX_COMPLEXITY
+ McCabe complexity threshold
+
+EXAMPLES
+========
+
+Simply running flake8 against the current directory::
+
+ flake8
+ flake8 .
+
+Running flake8 against a specific path::
+
+ flake8 path/to/file.py
+
+Ignoring violations from flake8::
+
+ flake8 --ignore E101
+ flake8 --ignore E1,E202
+
+Only report certain violations::
+
+ flake8 --select E101
+ flake8 --select E2,E742
+
+Analyzing only a diff::
+
+ git diff -U0 | flake8 --diff -
+
+Generate information for a bug report::
+
+ flake8 --bug-report
+
+SEE ALSO
+========
+
+Flake8 documentation: http://flake8.pycqa.org
+
+Flake8 Options and Examples: http://flake8.pycqa.org/en/latest/user/options.html
+
+PyCodeStyle documentation: http://pycodestyle.pycqa.org
+
+PyFlakes: https://github.com/pycqa/pyflakes
+
+McCabe: https://github.com/pycqa/mccabe
+
+BUGS
+====
+
+Please report all bugs to https://gitlab.com/pycqa/flake8
diff --git a/docs/source/plugin-development/plugin-parameters.rst b/docs/source/plugin-development/plugin-parameters.rst
index fd644bc..d387a65 100644
--- a/docs/source/plugin-development/plugin-parameters.rst
+++ b/docs/source/plugin-development/plugin-parameters.rst
@@ -38,27 +38,28 @@ a file, a plugin can ask for any of the following:
- :attr:`~flake8.processor.FileProcessor.noqa`
- :attr:`~flake8.processor.FileProcessor.previous_indent_level`
- :attr:`~flake8.processor.FileProcessor.previous_logical`
+- :attr:`~flake8.processor.FileProcessor.previous_unindented_logical_line`
- :attr:`~flake8.processor.FileProcessor.tokens`
-Some properties are set once per file being processed:
+Some properties are set once per file for plugins which iterate itself over
+the data instead of being called on each physical or logical line.
- :attr:`~flake8.processor.FileProcessor.filename`
+- :attr:`~flake8.processor.FileProcessor.file_tokens`
- :attr:`~flake8.processor.FileProcessor.lines`
- :attr:`~flake8.processor.FileProcessor.max_line_length`
- :attr:`~flake8.processor.FileProcessor.total_lines`
- :attr:`~flake8.processor.FileProcessor.verbose`
These parameters can also be supplied to plugins working on each line
-separately. Additionally, plugins called once per file can also accept ``tree``
-which is not supplied as a parameter of
-:class:`~flake8.processor.FileProcessor`, which will be a parsed abstract
-syntax tree. It is used by plugins like PyFlakes and McCabe.
-
-When the plugin is run depends on the first parameter, not counting ``self``.
-It can be either ``physical_line``, ``logical_line`` or ``tree``. If the
-parameter is ``tree``, it is run once per file, otherwise once per physical
-line or logical line respectively. If the plugin is using neither of them it
-won't be run at all.
+separately.
+
+Plugins that depend on ``physical_line`` or ``logical_line`` are run on each
+physical or logical line once. These parameters should be the first in the
+list of arguments (with the exception of ``self``). Plugins that need an AST
+(e.g., PyFlakes and McCabe) should depend on ``tree``. These plugins will run
+once per file. The parameters listed above can be combined with
+``physical_line``, ``logical_line``, and ``tree``.
Registering Options
diff --git a/docs/source/release-notes/3.0.0.rst b/docs/source/release-notes/3.0.0.rst
index d335494..2cec53a 100644
--- a/docs/source/release-notes/3.0.0.rst
+++ b/docs/source/release-notes/3.0.0.rst
@@ -47,3 +47,17 @@
- AST plugins can either be functions or classes and all plugins can now
register options so long as there are callable attributes named as we
expect.
+
+- Stop forcibly re-adding ``.tox``, ``.eggs``, and ``*.eggs`` to
+ ``--exclude``. Flake8 2.x started always appending those three patterns
+ to any exclude list (including the default and any user supplied list).
+ Flake8 3 has stopped adding these in, so you may see errors when upgrading
+ due to these patterns no longer being forcibly excluded by default if you
+ have your own exclude patterns specified.
+
+ To fix this, add the appropriate patterns to your exclude patterns list.
+
+ .. note::
+
+ This item was added in November of 2016, as a result of a bug
+ report.
diff --git a/docs/source/release-notes/3.1.0.rst b/docs/source/release-notes/3.1.0.rst
new file mode 100644
index 0000000..0b81792
--- /dev/null
+++ b/docs/source/release-notes/3.1.0.rst
@@ -0,0 +1,80 @@
+3.1.0 -- 2016-11-14
+-------------------
+
+You can view the `3.1.0 milestone`_ on GitLab for more details.
+
+- Add ``--bug-report`` flag to make issue reporters' lives easier.
+
+- Collect configuration files from the current directory when using our Git
+ hook. (See also `GitLab#210`_, `GitLab#218`_, `GitLab#223`_)
+
+- Avoid unhandled exceptions when dealing with SyntaxErrors. (See also
+ `GitLab#214`_, `GitLab#238`_)
+
+- Exit early if the value for ``--diff`` is empty. (See also `GitLab#226`_)
+
+- Handle empty ``--stdin-display-name`` values. (See also `GitLab#235`_)
+
+- Properly report the column number of Syntax Errors. We were assuming that
+ all reports of column numbers were 0-indexed, however, SyntaxErrors report
+ the column number as 1-indexed. This caused us to report a column number
+ that was 1 past the actual position. Further, when combined with
+ SyntaxErrors that occur at a newline, this caused the position to be
+ visually off by two. (See also `GitLab#237`_)
+
+- Fix the behaviour of ``--enable-extenstions``. Previously, items specified
+ here were still ignored due to the fact that the off-by-default extension
+ codes were being left in the ``ignore`` list. (See also `GitLab#239`_)
+
+- Fix problems around ``--select`` and ``--ignore`` behaviour that prevented
+ codes that were neither explicitly selected nor explicitly ignored from
+ being reported. (See also `GitLab#242`_)
+
+- Truly be quiet when the user specifies ``-q`` one or more times. Previously,
+ we were showing the if the user specified ``-q`` and ``--show-source``. We
+ have fixed this bug. (See also `GitLab#245`_)
+
+- Add new File Processor attribute, ``previous_unindented_logical_line`` to
+ accomodate pycodestyle 2.1.0. (See also `GitLab#246`_)
+
+- When something goes wrong, exit non-zero. (See also `GitLab#248`_,
+ `GitLab#209`_)
+
+- Add ``--tee`` as an option to allow use of ``--output-file`` and printing to
+ standard out.
+
+- Allow the git plugin to actually be lazy when collecting files.
+
+- Allow for pycodestyle 2.1 series and pyflakes 1.3 series.
+
+.. links
+.. _3.1.0 milestone:
+ https://gitlab.com/pycqa/flake8/milestones/12
+.. _GitLab#209:
+ https://gitlab.com/pycqa/flake8/issues/209
+.. _GitLab#210:
+ https://gitlab.com/pycqa/flake8/issues/210
+.. _GitLab#214:
+ https://gitlab.com/pycqa/flake8/issues/214
+.. _GitLab#218:
+ https://gitlab.com/pycqa/flake8/issues/218
+.. _GitLab#223:
+ https://gitlab.com/pycqa/flake8/issues/223
+.. _GitLab#226:
+ https://gitlab.com/pycqa/flake8/issues/226
+.. _GitLab#235:
+ https://gitlab.com/pycqa/flake8/issues/235
+.. _GitLab#237:
+ https://gitlab.com/pycqa/flake8/issues/237
+.. _GitLab#238:
+ https://gitlab.com/pycqa/flake8/issues/238
+.. _GitLab#239:
+ https://gitlab.com/pycqa/flake8/issues/239
+.. _GitLab#242:
+ https://gitlab.com/pycqa/flake8/issues/242
+.. _GitLab#245:
+ https://gitlab.com/pycqa/flake8/issues/245
+.. _GitLab#246:
+ https://gitlab.com/pycqa/flake8/issues/246
+.. _GitLab#248:
+ https://gitlab.com/pycqa/flake8/issues/248
diff --git a/docs/source/release-notes/3.1.1.rst b/docs/source/release-notes/3.1.1.rst
new file mode 100644
index 0000000..c22adde
--- /dev/null
+++ b/docs/source/release-notes/3.1.1.rst
@@ -0,0 +1,18 @@
+3.1.1 -- 2016-11-14
+-------------------
+
+You can view the `3.1.1 milestone`_ on GitLab for more details.
+
+- Do not attempt to install/distribute a ``man`` file with the Python package;
+ leave this for others to do. (See also `GitLab#254`_)
+
+- Fix packaging bug where wheel version constraints specified in setup.cfg did
+ not match the constraints in setup.py. (See also `GitLab#255`_)
+
+.. links
+.. _3.1.1 milestone:
+ https://gitlab.com/pycqa/flake8/milestones/13
+.. _GitLab#254:
+ https://gitlab.com/pycqa/flake8/issues/254
+.. _GitLab#255:
+ https://gitlab.com/pycqa/flake8/issues/255
diff --git a/docs/source/release-notes/3.2.0.rst b/docs/source/release-notes/3.2.0.rst
new file mode 100644
index 0000000..c360f64
--- /dev/null
+++ b/docs/source/release-notes/3.2.0.rst
@@ -0,0 +1,13 @@
+3.1.1 -- 2016-11-14
+-------------------
+
+You can view the `3.2.0 milestone`_ on GitLab for more details.
+
+- Allow for pycodestyle 2.2.0 which fixes a bug in E305 (See also
+ `GitLab#256`_)
+
+.. links
+.. _3.2.0 milestone:
+ https://gitlab.com/pycqa/flake8/milestones/14
+.. _GitLab#256:
+ https://gitlab.com/pycqa/flake8/issues/256
diff --git a/docs/source/release-notes/index.rst b/docs/source/release-notes/index.rst
index 07b9cd6..4bdbed3 100644
--- a/docs/source/release-notes/index.rst
+++ b/docs/source/release-notes/index.rst
@@ -5,12 +5,23 @@
All of the release notes that have been recorded for Flake8 are organized here
with the newest releases first.
+3.x Release Series
+==================
+
.. toctree::
+ 3.2.0
+ 3.1.1
+ 3.1.0
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
+
+2.x Release Series
+==================
+
+.. toctree::
2.6.2
2.6.1
2.6.0
@@ -31,6 +42,11 @@ with the newest releases first.
2.2.0
2.1.0
2.0.0
+
+1.x Release Series
+==================
+
+.. toctree::
1.7.0
1.6.2
1.6.1
@@ -42,6 +58,11 @@ with the newest releases first.
1.2.0
1.1.0
1.0.0
+
+0.x Release Series
+==================
+
+.. toctree::
0.9.0
0.8.0
0.7.0
diff --git a/docs/source/user/configuration.rst b/docs/source/user/configuration.rst
index 439aeae..5e81807 100644
--- a/docs/source/user/configuration.rst
+++ b/docs/source/user/configuration.rst
@@ -170,7 +170,7 @@ This would allow us to add comments for why we're excluding items, e.g.,
You can also specify ``--max-complexity`` as ``max_complexity = 10``.
This is also useful if you have a long list of error codes to ignore. Let's
-look at a portion of OpenStack's Swift `project configuration`_:
+look at a portion of a project's Flake8 configuration in their ``tox.ini``:
.. code-block:: ini
@@ -220,8 +220,5 @@ They use the comments to describe the check but they could also write this as:
H501
Or they could use each comment to describe **why** they've ignored the check.
-|Flake8| knows how to parse these lists and will appropriatey handle
+|Flake8| knows how to parse these lists and will appropriately handle
these situations.
-
-.. _project configuration:
- https://github.com/openstack/swift/blob/3944d820387f08372c1a29444f4af7d8e6090ae9/tox.ini#L66..L81
diff --git a/docs/source/user/error-codes.rst b/docs/source/user/error-codes.rst
index 9a2c26b..8bff640 100644
--- a/docs/source/user/error-codes.rst
+++ b/docs/source/user/error-codes.rst
@@ -38,6 +38,9 @@ generates its own :term:`error code`\ s for ``pyflakes``:
| F841 | local variable ``name`` is assigned to but never used |
+------+---------------------------------------------------------------------+
+We also report one extra error: ``E999``. We report ``E999`` when we fail to
+compile a file into an Abstract Syntax Tree for the plugins that require it.
+
``mccabe`` only ever reports one :term:`violation` - ``C901`` based on the
complexity value provided by the user.
diff --git a/docs/source/user/index.rst b/docs/source/user/index.rst
index e008eb2..e0f9108 100644
--- a/docs/source/user/index.rst
+++ b/docs/source/user/index.rst
@@ -26,6 +26,7 @@ This guide will cover all of these and the nuances for using |Flake8|.
error-codes
ignoring-errors
using-plugins
+ using-hooks
python-api
.. config files
diff --git a/docs/source/user/invocation.rst b/docs/source/user/invocation.rst
index 383e93a..d96d0f9 100644
--- a/docs/source/user/invocation.rst
+++ b/docs/source/user/invocation.rst
@@ -125,6 +125,7 @@ And you should see something like:
available to use. (Default: auto)
--output-file=OUTPUT_FILE
Redirect report to a file.
+ --tee Write to stdout and output-file.
--append-config=APPEND_CONFIG
Provide extra config files to parse in addition to the
files found by Flake8 by default. These files are the
diff --git a/docs/source/user/options.rst b/docs/source/user/options.rst
index acaa67c..6252c09 100644
--- a/docs/source/user/options.rst
+++ b/docs/source/user/options.rst
@@ -563,6 +563,26 @@
output_file = output.txt
+.. option:: --tee
+
+ Also print output to stdout if output-file has been configured.
+
+ Command-line example:
+
+ .. prompt:: bash
+
+ flake8 --tee --output-file=output.txt dir/
+
+ This **can** be specified in config files.
+
+ Example config file usage:
+
+ .. code-block:: ini
+
+ output-file = output.txt
+ tee = True
+
+
.. option:: --append-config=<config>
Provide extra config files to parse in after and in addition to the files
@@ -728,3 +748,51 @@
flake8 --benchmark dir/
This **can not** be specified in config files.
+
+
+.. option:: --bug-report
+
+ Generate information necessary to file a complete bug report for Flake8.
+ This will pretty-print a JSON blob that should be copied and pasted into a
+ bug report for Flake8.
+
+ Command-line usage:
+
+ .. prompt:: bash
+
+ flake8 --bug-report
+
+ The output should look vaguely like:
+
+ .. code-block:: js
+
+ {
+ "dependencies": [
+ {
+ "dependency": "setuptools",
+ "version": "25.1.1"
+ }
+ ],
+ "platform": {
+ "python_implementation": "CPython",
+ "python_version": "2.7.12",
+ "system": "Darwin"
+ },
+ "plugins": [
+ {
+ "plugin": "mccabe",
+ "version": "0.5.1"
+ },
+ {
+ "plugin": "pycodestyle",
+ "version": "2.0.0"
+ },
+ {
+ "plugin": "pyflakes",
+ "version": "1.2.3"
+ }
+ ],
+ "version": "3.1.0.dev0"
+ }
+
+ This **can not** be specified in config files.
diff --git a/docs/source/user/using-hooks.rst b/docs/source/user/using-hooks.rst
new file mode 100644
index 0000000..05b1ec6
--- /dev/null
+++ b/docs/source/user/using-hooks.rst
@@ -0,0 +1,69 @@
+=============================
+ Using Version Control Hooks
+=============================
+
+|Flake8| can be integrated into your development workflow in many ways. A
+default installation of |Flake8| can install pre-commit hooks for both
+`Git`_ and `Mercurial`_. To install a built-in hook, you can use the
+:option:`flake8 --install-hook` command-line option. For example, you can
+install a git pre-commit hook by running:
+
+.. prompt:: bash
+
+ flake8 --install-hook git
+
+This will install the pre-commit hook into ``.git/hooks/``. Alternatively,
+you can install the mercurial commit hook by running
+
+.. prompt:: bash
+
+ flake8 --install-hook mercurial
+
+
+Preventing Commits
+==================
+
+By default, |Flake8| does not prevent you from creating a commit with these
+hooks. Both hooks can be configured to be strict easily.
+
+Both our Git and Mercurial hooks check for the presence of ``flake8.strict``
+in each VCS' config. For example, you might configure this like so:
+
+.. prompt:: bash
+
+ git config --bool flake8.strict true
+ hg config flake8.strict true
+
+
+Checking All Modified Files Currently Tracked
+=============================================
+
+.. note::
+
+ Mercurial does not have the concept of an index or "stage" as best as I
+ understand.
+
+|Flake8| aims to make smart choices that keep things fast for users where
+possible. As a result, the |Flake8| Git pre-commit will default to only
+checking files that have been staged (i.e., added to the index). If, however,
+you are keen to be lazy and not independenty add files to your git index, you
+can set ``flake8.lazy`` to ``true`` (similar to how you would set
+``flake8.strict`` above) and this will check all tracked files.
+
+This is to support users who often find themselves doing things like:
+
+.. prompt:: bash
+
+ git commit -a
+
+.. note::
+
+ If you have files you have not yet added to the index, |Flake8| will not
+ see these and will not check them for you. You must ``git-add`` them
+ first.
+
+
+.. _Git:
+ https://git-scm.com/
+.. _Mercurial:
+ https://www.mercurial-scm.org/
diff --git a/pytest.ini b/pytest.ini
new file mode 100644
index 0000000..39a29fe
--- /dev/null
+++ b/pytest.ini
@@ -0,0 +1,3 @@
+[pytest]
+norecursedirs = .git .* *.egg* old docs dist build
+addopts = -rw
diff --git a/setup.cfg b/setup.cfg
index c32a36a..9c4111e 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -8,14 +8,10 @@ universal = 1
requires-dist =
enum34; python_version<"3.4"
configparser; python_version<"3.2"
- pyflakes >= 0.8.1, != 1.2.0, != 1.2.1, != 1.2.2, < 1.3.0
- pycodestyle >= 2.0.0, < 2.1.0
+ pyflakes >= 0.8.1, != 1.2.0, != 1.2.1, != 1.2.2, < 1.4.0
+ pycodestyle >= 2.0.0, < 2.3.0
mccabe >= 0.5.0, < 0.6.0
-[pytest]
-norecursedirs = .git .* *.egg* old docs dist build
-addopts = -rw
-
[egg_info]
tag_build =
tag_date = 0
diff --git a/setup.py b/setup.py
index d95530c..dc346e1 100644
--- a/setup.py
+++ b/setup.py
@@ -15,8 +15,8 @@ import flake8
tests_require = ['mock', 'pytest']
requires = [
- "pyflakes >= 0.8.1, != 1.2.0, != 1.2.1, != 1.2.2, < 1.3.0",
- "pycodestyle >= 2.0.0, < 2.1.0",
+ "pyflakes >= 0.8.1, != 1.2.0, != 1.2.1, != 1.2.2, < 1.4.0",
+ "pycodestyle >= 2.0.0, < 2.3.0",
"mccabe >= 0.5.0, < 0.6.0",
]
@@ -35,6 +35,7 @@ def get_long_description():
descr.append(f.read())
return '\n\n'.join(descr)
+
PEP8 = 'pycodestyle'
_FORMAT = '{0}.{1} = {0}:{1}'
PEP8_PLUGIN = functools.partial(_FORMAT.format, PEP8)
diff --git a/src/flake8.egg-info/PKG-INFO b/src/flake8.egg-info/PKG-INFO
index 578a535..f2689e9 100644
--- a/src/flake8.egg-info/PKG-INFO
+++ b/src/flake8.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: flake8
-Version: 3.0.4
+Version: 3.2.0
Summary: the modular source code checker: pep8, pyflakes and co
Home-page: https://gitlab.com/pycqa/flake8
Author: Ian Cordasco
@@ -61,7 +61,7 @@ Description: ========
Links
=====
- * `Flake8 Documentation <https://flake8.pycqa.org/en/latest/>`_
+ * `Flake8 Documentation <http://flake8.pycqa.org/en/latest/>`_
* `GitLab Project <https://gitlab.com/pycqa/flake8>`_
diff --git a/src/flake8.egg-info/SOURCES.txt b/src/flake8.egg-info/SOURCES.txt
index 89d02ef..4dfa338 100644
--- a/src/flake8.egg-info/SOURCES.txt
+++ b/src/flake8.egg-info/SOURCES.txt
@@ -3,258 +3,15 @@ CONTRIBUTORS.txt
LICENSE
MANIFEST.in
README.rst
+pytest.ini
setup.cfg
setup.py
-docs/build/.keep
-docs/build/html/.buildinfo
-docs/build/html/faq.html
-docs/build/html/genindex.html
-docs/build/html/glossary.html
-docs/build/html/index.html
-docs/build/html/objects.inv
-docs/build/html/py-modindex.html
-docs/build/html/search.html
-docs/build/html/searchindex.js
-docs/build/html/.doctrees/faq.doctree
-docs/build/html/.doctrees/glossary.doctree
-docs/build/html/.doctrees/index.doctree
-docs/build/html/.doctrees/internal/checker.doctree
-docs/build/html/.doctrees/internal/cli.doctree
-docs/build/html/.doctrees/internal/contributing.doctree
-docs/build/html/.doctrees/internal/formatters.doctree
-docs/build/html/.doctrees/internal/index.doctree
-docs/build/html/.doctrees/internal/option_handling.doctree
-docs/build/html/.doctrees/internal/plugin_handling.doctree
-docs/build/html/.doctrees/internal/releases.doctree
-docs/build/html/.doctrees/internal/start-to-finish.doctree
-docs/build/html/.doctrees/internal/utils.doctree
-docs/build/html/.doctrees/internal/writing-documentation.doctree
-docs/build/html/.doctrees/plugin-development/cross-compatibility.doctree
-docs/build/html/.doctrees/plugin-development/formatters.doctree
-docs/build/html/.doctrees/plugin-development/index.doctree
-docs/build/html/.doctrees/plugin-development/plugin-parameters.doctree
-docs/build/html/.doctrees/plugin-development/registering-plugins.doctree
-docs/build/html/.doctrees/release-notes/0.6.0.doctree
-docs/build/html/.doctrees/release-notes/0.7.0.doctree
-docs/build/html/.doctrees/release-notes/0.8.0.doctree
-docs/build/html/.doctrees/release-notes/0.9.0.doctree
-docs/build/html/.doctrees/release-notes/1.0.0.doctree
-docs/build/html/.doctrees/release-notes/1.1.0.doctree
-docs/build/html/.doctrees/release-notes/1.2.0.doctree
-docs/build/html/.doctrees/release-notes/1.3.0.doctree
-docs/build/html/.doctrees/release-notes/1.3.1.doctree
-docs/build/html/.doctrees/release-notes/1.4.0.doctree
-docs/build/html/.doctrees/release-notes/1.5.0.doctree
-docs/build/html/.doctrees/release-notes/1.6.0.doctree
-docs/build/html/.doctrees/release-notes/1.6.1.doctree
-docs/build/html/.doctrees/release-notes/1.6.2.doctree
-docs/build/html/.doctrees/release-notes/1.7.0.doctree
-docs/build/html/.doctrees/release-notes/2.0.0.doctree
-docs/build/html/.doctrees/release-notes/2.1.0.doctree
-docs/build/html/.doctrees/release-notes/2.2.0.doctree
-docs/build/html/.doctrees/release-notes/2.2.1.doctree
-docs/build/html/.doctrees/release-notes/2.2.2.doctree
-docs/build/html/.doctrees/release-notes/2.2.3.doctree
-docs/build/html/.doctrees/release-notes/2.2.4.doctree
-docs/build/html/.doctrees/release-notes/2.2.5.doctree
-docs/build/html/.doctrees/release-notes/2.3.0.doctree
-docs/build/html/.doctrees/release-notes/2.4.0.doctree
-docs/build/html/.doctrees/release-notes/2.4.1.doctree
-docs/build/html/.doctrees/release-notes/2.5.0.doctree
-docs/build/html/.doctrees/release-notes/2.5.1.doctree
-docs/build/html/.doctrees/release-notes/2.5.2.doctree
-docs/build/html/.doctrees/release-notes/2.5.3.doctree
-docs/build/html/.doctrees/release-notes/2.5.4.doctree
-docs/build/html/.doctrees/release-notes/2.5.5.doctree
-docs/build/html/.doctrees/release-notes/2.6.0.doctree
-docs/build/html/.doctrees/release-notes/2.6.1.doctree
-docs/build/html/.doctrees/release-notes/2.6.2.doctree
-docs/build/html/.doctrees/release-notes/3.0.0.doctree
-docs/build/html/.doctrees/release-notes/index.doctree
-docs/build/html/.doctrees/user/configuration.doctree
-docs/build/html/.doctrees/user/ignoring-errors.doctree
-docs/build/html/.doctrees/user/index.doctree
-docs/build/html/.doctrees/user/invocation.doctree
-docs/build/html/.doctrees/user/options.doctree
-docs/build/html/.doctrees/user/python-api.doctree
-docs/build/html/.doctrees/user/using-plugins.doctree
-docs/build/html/_modules/index.html
-docs/build/html/_modules/flake8/api.html
-docs/build/html/_modules/flake8/checker.html
-docs/build/html/_modules/flake8/processor.html
-docs/build/html/_modules/flake8/utils.html
-docs/build/html/_modules/flake8/formatting/base.html
-docs/build/html/_modules/flake8/formatting/default.html
-docs/build/html/_modules/flake8/main/application.html
-docs/build/html/_modules/flake8/main/cli.html
-docs/build/html/_modules/flake8/main/options.html
-docs/build/html/_modules/flake8/options/aggregator.html
-docs/build/html/_modules/flake8/options/config.html
-docs/build/html/_modules/flake8/options/manager.html
-docs/build/html/_modules/flake8/plugins/_trie.html
-docs/build/html/_modules/flake8/plugins/manager.html
-docs/build/html/_modules/flake8/plugins/notifier.html
-docs/build/html/_sources/faq.txt
-docs/build/html/_sources/glossary.txt
-docs/build/html/_sources/index.txt
-docs/build/html/_sources/internal/checker.txt
-docs/build/html/_sources/internal/cli.txt
-docs/build/html/_sources/internal/contributing.txt
-docs/build/html/_sources/internal/formatters.txt
-docs/build/html/_sources/internal/index.txt
-docs/build/html/_sources/internal/option_handling.txt
-docs/build/html/_sources/internal/plugin_handling.txt
-docs/build/html/_sources/internal/releases.txt
-docs/build/html/_sources/internal/start-to-finish.txt
-docs/build/html/_sources/internal/utils.txt
-docs/build/html/_sources/internal/writing-documentation.txt
-docs/build/html/_sources/plugin-development/cross-compatibility.txt
-docs/build/html/_sources/plugin-development/formatters.txt
-docs/build/html/_sources/plugin-development/index.txt
-docs/build/html/_sources/plugin-development/plugin-parameters.txt
-docs/build/html/_sources/plugin-development/registering-plugins.txt
... 1436 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-flake8.git
More information about the Python-modules-commits
mailing list