[Python-modules-commits] [python-flake8] 02/05: Import python-flake8_2.6.0.orig.tar.gz

Barry Warsaw barry at moszumanska.debian.org
Mon Jun 20 16:32:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

barry pushed a commit to branch master
in repository python-flake8.

commit a6cf72ae957adb0750f166fde066f03ea191ddd9
Author: Barry Warsaw <barry at ubuntu.com>
Date:   Mon Jun 20 11:41:11 2016 -0400

    Import python-flake8_2.6.0.orig.tar.gz
---
 CHANGES.rst                                        |  28 ++++-
 CONTRIBUTORS.txt                                   |   1 +
 PKG-INFO                                           |  34 +++++-
 README.rst                                         |   4 +-
 flake8.egg-info/PKG-INFO                           |  34 +++++-
 flake8.egg-info/SOURCES.txt                        |   2 -
 flake8.egg-info/pbr.json                           |   1 -
 flake8.egg-info/requires.txt                       |   6 +-
 flake8/__init__.py                                 |   2 +-
 flake8/__init__.pyc                                | Bin 167 -> 168 bytes
 flake8/__pycache__/__init__.cpython-34.pyc         | Bin 154 -> 155 bytes
 flake8/__pycache__/_pyflakes.cpython-34.pyc        | Bin 4332 -> 4375 bytes
 flake8/__pycache__/callbacks.cpython-34.pyc        | Bin 769 -> 770 bytes
 flake8/__pycache__/compat.cpython-34.pyc           | Bin 558 -> 559 bytes
 flake8/__pycache__/engine.cpython-34.pyc           | Bin 9959 -> 10033 bytes
 flake8/__pycache__/hooks.cpython-34.pyc            | Bin 8223 -> 8160 bytes
 flake8/__pycache__/main.cpython-34.pyc             | Bin 4568 -> 4536 bytes
 flake8/__pycache__/reporter.cpython-34.pyc         | Bin 4552 -> 4515 bytes
 flake8/__pycache__/util.cpython-34.pyc             | Bin 2513 -> 3052 bytes
 flake8/_pyflakes.py                                |   3 +-
 flake8/_pyflakes.pyc                               | Bin 4822 -> 4805 bytes
 flake8/callbacks.pyc                               | Bin 985 -> 989 bytes
 flake8/compat.pyc                                  | Bin 647 -> 646 bytes
 flake8/engine.py                                   |   4 +-
 flake8/engine.pyc                                  | Bin 11275 -> 11278 bytes
 flake8/hooks.py                                    |   8 +-
 flake8/hooks.pyc                                   | Bin 9208 -> 8897 bytes
 flake8/main.py                                     |  25 +++--
 flake8/main.pyc                                    | Bin 5229 -> 5166 bytes
 flake8/reporter.py                                 |   6 +-
 flake8/reporter.pyc                                | Bin 5237 -> 5173 bytes
 flake8/tests/__init__.pyc                          | Bin 141 -> 142 bytes
 flake8/tests/__pycache__/__init__.cpython-34.pyc   | Bin 137 -> 138 bytes
 .../__pycache__/_test_warnings.cpython-34.pyc      | Bin 6709 -> 6717 bytes
 .../tests/__pycache__/test_engine.cpython-34.pyc   | Bin 10281 -> 10308 bytes
 flake8/tests/__pycache__/test_hooks.cpython-34.pyc | Bin 2066 -> 2067 bytes
 .../__pycache__/test_integration.cpython-34.pyc    | Bin 3213 -> 3228 bytes
 flake8/tests/__pycache__/test_main.cpython-34.pyc  | Bin 776 -> 777 bytes
 .../tests/__pycache__/test_pyflakes.cpython-34.pyc | Bin 3477 -> 3478 bytes
 .../tests/__pycache__/test_reporter.cpython-34.pyc | Bin 1956 -> 1957 bytes
 flake8/tests/__pycache__/test_util.cpython-34.pyc  | Bin 3642 -> 6409 bytes
 flake8/tests/_test_warnings.py                     |   2 +-
 flake8/tests/_test_warnings.pyc                    | Bin 7068 -> 7091 bytes
 flake8/tests/test_engine.py                        |   6 +-
 flake8/tests/test_engine.pyc                       | Bin 11801 -> 11546 bytes
 flake8/tests/test_git_hook.pyc                     | Bin 4300 -> 0 bytes
 flake8/tests/test_hooks.pyc                        | Bin 2379 -> 2375 bytes
 flake8/tests/test_integration.py                   |   4 +-
 flake8/tests/test_integration.pyc                  | Bin 3867 -> 3730 bytes
 flake8/tests/test_main.pyc                         | Bin 899 -> 900 bytes
 flake8/tests/test_pyflakes.pyc                     | Bin 3861 -> 3806 bytes
 flake8/tests/test_reporter.pyc                     | Bin 2184 -> 2187 bytes
 flake8/tests/test_util.py                          | 115 ++++++++++++++-------
 flake8/tests/test_util.pyc                         | Bin 4117 -> 6947 bytes
 flake8/util.py                                     |  34 ++++--
 flake8/util.pyc                                    | Bin 3005 -> 3597 bytes
 setup.cfg                                          |   4 +-
 setup.py                                           |   6 +-
 58 files changed, 222 insertions(+), 107 deletions(-)

diff --git a/CHANGES.rst b/CHANGES.rst
index 47ef27f..d24840f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,30 @@
 CHANGES
 =======
 
+2.6.0 - 2016-06-15
+------------------
+
+- **Requirements Change** Switch to pycodestyle as all future pep8 releases
+  will use that package name
+
+- **Improvement** Allow for Windows users on *select* versions of Python to
+  use ``--jobs`` and multiprocessing
+
+- **Improvement** Update bounds on McCabe
+
+- **Improvement** Update bounds on PyFlakes and blacklist known broken
+  versions
+
+- **Improvement** Handle new PyFlakes warning with a new error code: F405
+
+2.5.5 - 2016-06-14
+------------------
+
+- **Bug** Fix setuptools integration when parsing config files
+
+- **Bug** Don't pass the user's config path as the config_file when creating a
+  StyleGuide
+
 2.5.4 - 2016-02-11
 ------------------
 
@@ -105,7 +129,7 @@ CHANGES
 .. _GitLab#35: https://gitlab.com/pycqa/flake8/issues/35
 .. _GitLab!18: https://gitlab.com/pycqa/flake8/merge_requests/18
 .. _GitLab!20: https://gitlab.com/pycqa/flake8/merge_requests/20
-.. _VCS hooks docs: https://flake8.readthedocs.org/en/latest/vcs.html
+.. _VCS hooks docs: https://flake8.readthedocs.io/en/latest/vcs.html
 
 2.3.0 - 2015-01-04
 ------------------
@@ -198,7 +222,7 @@ CHANGES
 - McCabe complexity warnings are prefixed by a ``C`` instead of a ``W``
 - Flake8 supports extensions through entry points
 - Due to the above support, we **require** setuptools
-- We publish the `documentation <https://flake8.readthedocs.org/>`_
+- We publish the `documentation <https://flake8.readthedocs.io/>`_
 - Fixes #13: pep8, pyflakes and mccabe become external dependencies
 - Split run.py into main.py, engine.py and hooks.py for better logic
 - Expose our parser for our users
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index e64c332..78ea654 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -24,3 +24,4 @@ Contributors (by order of appearance) :
 - Christian Long
 - Tyrel Souza
 - Corey Farwell
+- Michael Penkov
diff --git a/PKG-INFO b/PKG-INFO
index 92cfc33..dd4361a 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: flake8
-Version: 2.5.4
+Version: 2.6.0
 Summary: the modular source code checker: pep8, pyflakes and co
 Home-page: https://gitlab.com/pycqa/flake8
 Author: Ian Cordasco
@@ -100,14 +100,38 @@ Description: ======
         Links
         =====
         
-        * `flake8 documentation <http://flake8.readthedocs.org/en/latest/>`_
+        * `flake8 documentation <https://flake8.readthedocs.io/en/latest/>`_
         
-        * `pep8 documentation <http://pep8.readthedocs.org/en/latest/>`_
+        * `pep8 documentation <https://pep8.readthedocs.io/en/latest/>`_
         
         
         CHANGES
         =======
         
+        2.6.0 - 2016-06-15
+        ------------------
+        
+        - **Requirements Change** Switch to pycodestyle as all future pep8 releases
+          will use that package name
+        
+        - **Improvement** Allow for Windows users on *select* versions of Python to
+          use ``--jobs`` and multiprocessing
+        
+        - **Improvement** Update bounds on McCabe
+        
+        - **Improvement** Update bounds on PyFlakes and blacklist known broken
+          versions
+        
+        - **Improvement** Handle new PyFlakes warning with a new error code: F405
+        
+        2.5.5 - 2016-06-14
+        ------------------
+        
+        - **Bug** Fix setuptools integration when parsing config files
+        
+        - **Bug** Don't pass the user's config path as the config_file when creating a
+          StyleGuide
+        
         2.5.4 - 2016-02-11
         ------------------
         
@@ -212,7 +236,7 @@ Description: ======
         .. _GitLab#35: https://gitlab.com/pycqa/flake8/issues/35
         .. _GitLab!18: https://gitlab.com/pycqa/flake8/merge_requests/18
         .. _GitLab!20: https://gitlab.com/pycqa/flake8/merge_requests/20
-        .. _VCS hooks docs: https://flake8.readthedocs.org/en/latest/vcs.html
+        .. _VCS hooks docs: https://flake8.readthedocs.io/en/latest/vcs.html
         
         2.3.0 - 2015-01-04
         ------------------
@@ -305,7 +329,7 @@ Description: ======
         - McCabe complexity warnings are prefixed by a ``C`` instead of a ``W``
         - Flake8 supports extensions through entry points
         - Due to the above support, we **require** setuptools
-        - We publish the `documentation <https://flake8.readthedocs.org/>`_
+        - We publish the `documentation <https://flake8.readthedocs.io/>`_
         - Fixes #13: pep8, pyflakes and mccabe become external dependencies
         - Split run.py into main.py, engine.py and hooks.py for better logic
         - Expose our parser for our users
diff --git a/README.rst b/README.rst
index 90a356d..1e02daa 100644
--- a/README.rst
+++ b/README.rst
@@ -92,6 +92,6 @@ suggest, the mailing list would be the best place for it.
 Links
 =====
 
-* `flake8 documentation <http://flake8.readthedocs.org/en/latest/>`_
+* `flake8 documentation <https://flake8.readthedocs.io/en/latest/>`_
 
-* `pep8 documentation <http://pep8.readthedocs.org/en/latest/>`_
+* `pep8 documentation <https://pep8.readthedocs.io/en/latest/>`_
diff --git a/flake8.egg-info/PKG-INFO b/flake8.egg-info/PKG-INFO
index 92cfc33..dd4361a 100644
--- a/flake8.egg-info/PKG-INFO
+++ b/flake8.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: flake8
-Version: 2.5.4
+Version: 2.6.0
 Summary: the modular source code checker: pep8, pyflakes and co
 Home-page: https://gitlab.com/pycqa/flake8
 Author: Ian Cordasco
@@ -100,14 +100,38 @@ Description: ======
         Links
         =====
         
-        * `flake8 documentation <http://flake8.readthedocs.org/en/latest/>`_
+        * `flake8 documentation <https://flake8.readthedocs.io/en/latest/>`_
         
-        * `pep8 documentation <http://pep8.readthedocs.org/en/latest/>`_
+        * `pep8 documentation <https://pep8.readthedocs.io/en/latest/>`_
         
         
         CHANGES
         =======
         
+        2.6.0 - 2016-06-15
+        ------------------
+        
+        - **Requirements Change** Switch to pycodestyle as all future pep8 releases
+          will use that package name
+        
+        - **Improvement** Allow for Windows users on *select* versions of Python to
+          use ``--jobs`` and multiprocessing
+        
+        - **Improvement** Update bounds on McCabe
+        
+        - **Improvement** Update bounds on PyFlakes and blacklist known broken
+          versions
+        
+        - **Improvement** Handle new PyFlakes warning with a new error code: F405
+        
+        2.5.5 - 2016-06-14
+        ------------------
+        
+        - **Bug** Fix setuptools integration when parsing config files
+        
+        - **Bug** Don't pass the user's config path as the config_file when creating a
+          StyleGuide
+        
         2.5.4 - 2016-02-11
         ------------------
         
@@ -212,7 +236,7 @@ Description: ======
         .. _GitLab#35: https://gitlab.com/pycqa/flake8/issues/35
         .. _GitLab!18: https://gitlab.com/pycqa/flake8/merge_requests/18
         .. _GitLab!20: https://gitlab.com/pycqa/flake8/merge_requests/20
-        .. _VCS hooks docs: https://flake8.readthedocs.org/en/latest/vcs.html
+        .. _VCS hooks docs: https://flake8.readthedocs.io/en/latest/vcs.html
         
         2.3.0 - 2015-01-04
         ------------------
@@ -305,7 +329,7 @@ Description: ======
         - McCabe complexity warnings are prefixed by a ``C`` instead of a ``W``
         - Flake8 supports extensions through entry points
         - Due to the above support, we **require** setuptools
-        - We publish the `documentation <https://flake8.readthedocs.org/>`_
+        - We publish the `documentation <https://flake8.readthedocs.io/>`_
         - Fixes #13: pep8, pyflakes and mccabe become external dependencies
         - Split run.py into main.py, engine.py and hooks.py for better logic
         - Expose our parser for our users
diff --git a/flake8.egg-info/SOURCES.txt b/flake8.egg-info/SOURCES.txt
index 9f54420..2fefe67 100644
--- a/flake8.egg-info/SOURCES.txt
+++ b/flake8.egg-info/SOURCES.txt
@@ -29,7 +29,6 @@ flake8.egg-info/PKG-INFO
 flake8.egg-info/SOURCES.txt
 flake8.egg-info/dependency_links.txt
 flake8.egg-info/entry_points.txt
-flake8.egg-info/pbr.json
 flake8.egg-info/requires.txt
 flake8.egg-info/top_level.txt
 flake8/__pycache__/__init__.cpython-34.pyc
@@ -47,7 +46,6 @@ flake8/tests/_test_warnings.py
 flake8/tests/_test_warnings.pyc
 flake8/tests/test_engine.py
 flake8/tests/test_engine.pyc
-flake8/tests/test_git_hook.pyc
 flake8/tests/test_hooks.py
 flake8/tests/test_hooks.pyc
 flake8/tests/test_integration.py
diff --git a/flake8.egg-info/pbr.json b/flake8.egg-info/pbr.json
deleted file mode 100644
index c5aa0cf..0000000
--- a/flake8.egg-info/pbr.json
+++ /dev/null
@@ -1 +0,0 @@
-{"is_release": false, "git_version": "b827629"}
\ No newline at end of file
diff --git a/flake8.egg-info/requires.txt b/flake8.egg-info/requires.txt
index 766bfe7..7b81e84 100644
--- a/flake8.egg-info/requires.txt
+++ b/flake8.egg-info/requires.txt
@@ -1,3 +1,3 @@
-pyflakes >= 0.8.1, < 1.1
-pep8 >= 1.5.7, != 1.6.0, != 1.6.1, != 1.6.2
-mccabe >= 0.2.1, < 0.5
+pyflakes >= 0.8.1, < 1.3, != 1.2.0, != 1.2.1, != 1.2.2
+pycodestyle >= 2.0, < 2.1
+mccabe >= 0.2.1, < 0.6
diff --git a/flake8/__init__.py b/flake8/__init__.py
index 36dc058..f0e5e1e 100644
--- a/flake8/__init__.py
+++ b/flake8/__init__.py
@@ -1 +1 @@
-__version__ = '2.5.4'
+__version__ = '2.6.0'
diff --git a/flake8/__init__.pyc b/flake8/__init__.pyc
index c18b1ab..994b989 100644
Binary files a/flake8/__init__.pyc and b/flake8/__init__.pyc differ
diff --git a/flake8/__pycache__/__init__.cpython-34.pyc b/flake8/__pycache__/__init__.cpython-34.pyc
index 72cc45e..88b24b6 100644
Binary files a/flake8/__pycache__/__init__.cpython-34.pyc and b/flake8/__pycache__/__init__.cpython-34.pyc differ
diff --git a/flake8/__pycache__/_pyflakes.cpython-34.pyc b/flake8/__pycache__/_pyflakes.cpython-34.pyc
index 4090a01..7e97403 100644
Binary files a/flake8/__pycache__/_pyflakes.cpython-34.pyc and b/flake8/__pycache__/_pyflakes.cpython-34.pyc differ
diff --git a/flake8/__pycache__/callbacks.cpython-34.pyc b/flake8/__pycache__/callbacks.cpython-34.pyc
index f5d7222..ff29e3b 100644
Binary files a/flake8/__pycache__/callbacks.cpython-34.pyc and b/flake8/__pycache__/callbacks.cpython-34.pyc differ
diff --git a/flake8/__pycache__/compat.cpython-34.pyc b/flake8/__pycache__/compat.cpython-34.pyc
index e4ad3f7..8c76e8a 100644
Binary files a/flake8/__pycache__/compat.cpython-34.pyc and b/flake8/__pycache__/compat.cpython-34.pyc differ
diff --git a/flake8/__pycache__/engine.cpython-34.pyc b/flake8/__pycache__/engine.cpython-34.pyc
index 360c4e0..a5672db 100644
Binary files a/flake8/__pycache__/engine.cpython-34.pyc and b/flake8/__pycache__/engine.cpython-34.pyc differ
diff --git a/flake8/__pycache__/hooks.cpython-34.pyc b/flake8/__pycache__/hooks.cpython-34.pyc
index 2f3425c..83260ea 100644
Binary files a/flake8/__pycache__/hooks.cpython-34.pyc and b/flake8/__pycache__/hooks.cpython-34.pyc differ
diff --git a/flake8/__pycache__/main.cpython-34.pyc b/flake8/__pycache__/main.cpython-34.pyc
index 5d68ae4..9b570cf 100644
Binary files a/flake8/__pycache__/main.cpython-34.pyc and b/flake8/__pycache__/main.cpython-34.pyc differ
diff --git a/flake8/__pycache__/reporter.cpython-34.pyc b/flake8/__pycache__/reporter.cpython-34.pyc
index f7ce746..08022e0 100644
Binary files a/flake8/__pycache__/reporter.cpython-34.pyc and b/flake8/__pycache__/reporter.cpython-34.pyc differ
diff --git a/flake8/__pycache__/util.cpython-34.pyc b/flake8/__pycache__/util.cpython-34.pyc
index d7b67c0..aeb3d11 100644
Binary files a/flake8/__pycache__/util.cpython-34.pyc and b/flake8/__pycache__/util.cpython-34.pyc differ
diff --git a/flake8/_pyflakes.py b/flake8/_pyflakes.py
index 976b2ab..e4fded6 100644
--- a/flake8/_pyflakes.py
+++ b/flake8/_pyflakes.py
@@ -8,7 +8,7 @@ else:
     demandimport.disable()
 import os
 
-import pep8
+import pycodestyle as pep8
 import pyflakes
 import pyflakes.checker
 
@@ -20,6 +20,7 @@ def patch_pyflakes():
         'F402 ImportShadowedByLoopVar',
         'F403 ImportStarUsed',
         'F404 LateFutureImport',
+        'F405 ImportStarUsage',
         'F810 Redefined',               # XXX Obsolete?
         'F811 RedefinedWhileUnused',
         'F812 RedefinedInListComp',
diff --git a/flake8/_pyflakes.pyc b/flake8/_pyflakes.pyc
index dd11a9b..a8e491a 100644
Binary files a/flake8/_pyflakes.pyc and b/flake8/_pyflakes.pyc differ
diff --git a/flake8/callbacks.pyc b/flake8/callbacks.pyc
index b62c8ec..da4606c 100644
Binary files a/flake8/callbacks.pyc and b/flake8/callbacks.pyc differ
diff --git a/flake8/compat.pyc b/flake8/compat.pyc
index 62a2e2d..69c2e42 100644
Binary files a/flake8/compat.pyc and b/flake8/compat.pyc differ
diff --git a/flake8/engine.py b/flake8/engine.py
index 816f1ee..129c338 100644
--- a/flake8/engine.py
+++ b/flake8/engine.py
@@ -6,7 +6,7 @@ import re
 import sys
 import warnings
 
-import pep8
+import pycodestyle as pep8
 
 from flake8 import __version__
 from flake8 import callbacks
@@ -44,7 +44,7 @@ def _load_entry_point(entry_point, verify_requirements):
 def _register_extensions():
     """Register all the extensions."""
     extensions = util.OrderedSet()
-    extensions.add(('pep8', pep8.__version__))
+    extensions.add(('pycodestyle', pep8.__version__))
     parser_hooks = []
     options_hooks = []
     ignored_hooks = []
diff --git a/flake8/engine.pyc b/flake8/engine.pyc
index 45e0b6b..501d9eb 100644
Binary files a/flake8/engine.pyc and b/flake8/engine.pyc differ
diff --git a/flake8/hooks.py b/flake8/hooks.py
index 14f844e..40cbf97 100644
--- a/flake8/hooks.py
+++ b/flake8/hooks.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 from __future__ import with_statement
 import os
-import pep8
+import pycodestyle as pep8
 import sys
 import stat
 from subprocess import Popen, PIPE
@@ -14,7 +14,6 @@ except ImportError:   # Python 2
 
 from flake8 import compat
 from flake8.engine import get_parser, get_style_guide
-from flake8.main import DEFAULT_CONFIG
 
 
 def git_hook(complexity=-1, strict=False, ignore=None, lazy=False):
@@ -51,8 +50,7 @@ def git_hook(complexity=-1, strict=False, ignore=None, lazy=False):
 
     tmpdir = tempfile.mkdtemp()
 
-    flake8_style = get_style_guide(config_file=DEFAULT_CONFIG, paths=['.'],
-                                   **options)
+    flake8_style = get_style_guide(paths=['.'], **options)
     filepatterns = flake8_style.options.filename
 
     # Copy staged versions to temporary directory
@@ -102,7 +100,7 @@ def hg_hook(ui, repo, **kwargs):
     complexity = ui.config('flake8', 'complexity', default=-1)
     strict = ui.configbool('flake8', 'strict', default=True)
     ignore = ui.config('flake8', 'ignore', default=None)
-    config = ui.config('flake8', 'config', default=DEFAULT_CONFIG)
+    config = ui.config('flake8', 'config', default=None)
 
     paths = _get_files(repo, **kwargs)
 
diff --git a/flake8/hooks.pyc b/flake8/hooks.pyc
index 0ae127d..4edb1d6 100644
Binary files a/flake8/hooks.pyc and b/flake8/hooks.pyc differ
diff --git a/flake8/main.py b/flake8/main.py
index 297618a..9b1b0a6 100644
--- a/flake8/main.py
+++ b/flake8/main.py
@@ -3,26 +3,29 @@ import os
 import re
 import sys
 
+import pycodestyle as pep8
 import setuptools
 
 from flake8.engine import get_parser, get_style_guide
 from flake8.util import option_normalizer
 
 if sys.platform.startswith('win'):
-    DEFAULT_CONFIG = os.path.expanduser(r'~\.flake8')
+    USER_CONFIG = os.path.expanduser(r'~\.flake8')
 else:
-    DEFAULT_CONFIG = os.path.join(
+    USER_CONFIG = os.path.join(
         os.getenv('XDG_CONFIG_HOME') or os.path.expanduser('~/.config'),
         'flake8'
     )
 
+pep8.USER_CONFIG = USER_CONFIG
+
 EXTRA_IGNORE = []
 
 
 def main():
     """Parse options and run checks on Python source."""
     # Prepare
-    flake8_style = get_style_guide(parse_argv=True, config_file=DEFAULT_CONFIG)
+    flake8_style = get_style_guide(parse_argv=True)
     options = flake8_style.options
 
     if options.install_hook:
@@ -61,8 +64,7 @@ def check_file(path, ignore=(), complexity=-1):
     :param int complexity: (optional), enables the mccabe check for values > 0
     """
     ignore = set(ignore).union(EXTRA_IGNORE)
-    flake8_style = get_style_guide(
-        config_file=DEFAULT_CONFIG, ignore=ignore, max_complexity=complexity)
+    flake8_style = get_style_guide(ignore=ignore, max_complexity=complexity)
     return flake8_style.input_file(path)
 
 
@@ -74,8 +76,7 @@ def check_code(code, ignore=(), complexity=-1):
     :param int complexity: (optional), enables the mccabe check for values > 0
     """
     ignore = set(ignore).union(EXTRA_IGNORE)
-    flake8_style = get_style_guide(
-        config_file=DEFAULT_CONFIG, ignore=ignore, max_complexity=complexity)
+    flake8_style = get_style_guide(ignore=ignore, max_complexity=complexity)
     return flake8_style.input_file(None, lines=code.splitlines(True))
 
 
@@ -93,18 +94,18 @@ class Flake8Command(setuptools.Command):
         for opt in parser.option_list:
             cmd_name = opt._long_opts[0][2:]
             option_name = cmd_name.replace('-', '_')
-            self.option_to_cmds[option_name] = cmd_name
+            self.option_to_cmds[option_name] = opt
             setattr(self, option_name, None)
 
     def finalize_options(self):
         self.options_dict = {}
-        for (option_name, cmd_name) in self.option_to_cmds.items():
+        for (option_name, opt) in self.option_to_cmds.items():
             if option_name in ['help', 'verbose']:
                 continue
             value = getattr(self, option_name)
             if value is None:
                 continue
-            value = option_normalizer(value)
+            value = option_normalizer(value, opt, option_name)
             # Check if there's any values that need to be fixed.
             if option_name == "include" and isinstance(value, str):
                 value = re.findall('[^,;\s]+', value)
@@ -131,9 +132,7 @@ class Flake8Command(setuptools.Command):
     def run(self):
         # Prepare
         paths = list(self.distribution_files())
-        flake8_style = get_style_guide(config_file=DEFAULT_CONFIG,
-                                       paths=paths,
-                                       **self.options_dict)
+        flake8_style = get_style_guide(paths=paths, **self.options_dict)
 
         # Run the checkers
         report = flake8_style.check_files()
diff --git a/flake8/main.pyc b/flake8/main.pyc
index ab2486c..80d7b51 100644
Binary files a/flake8/main.pyc and b/flake8/main.pyc differ
diff --git a/flake8/reporter.py b/flake8/reporter.py
index 1df3d9e..cea3717 100644
--- a/flake8/reporter.py
+++ b/flake8/reporter.py
@@ -10,7 +10,7 @@ try:
 except ImportError:     # Python 2.5
     multiprocessing = None
 
-import pep8
+import pycodestyle as pep8
 
 __all__ = ['multiprocessing', 'BaseQReport', 'QueueReport']
 
@@ -59,8 +59,8 @@ class BaseQReport(pep8.BaseReport):
     def _process_main(self):
         if not self._loaded:
             # Windows needs to parse again the configuration
-            from flake8.main import get_style_guide, DEFAULT_CONFIG
-            get_style_guide(parse_argv=True, config_file=DEFAULT_CONFIG)
+            from flake8.main import get_style_guide
+            get_style_guide(parse_argv=True)
         for filename in iter(self.task_queue.get, 'DONE'):
             self.input_file(filename)
 
diff --git a/flake8/reporter.pyc b/flake8/reporter.pyc
index 678edbf..27d3ee9 100644
Binary files a/flake8/reporter.pyc and b/flake8/reporter.pyc differ
diff --git a/flake8/tests/__init__.pyc b/flake8/tests/__init__.pyc
index e6e9770..9d4ddc0 100644
Binary files a/flake8/tests/__init__.pyc and b/flake8/tests/__init__.pyc differ
diff --git a/flake8/tests/__pycache__/__init__.cpython-34.pyc b/flake8/tests/__pycache__/__init__.cpython-34.pyc
index 87e7c37..d6da35b 100644
Binary files a/flake8/tests/__pycache__/__init__.cpython-34.pyc and b/flake8/tests/__pycache__/__init__.cpython-34.pyc differ
diff --git a/flake8/tests/__pycache__/_test_warnings.cpython-34.pyc b/flake8/tests/__pycache__/_test_warnings.cpython-34.pyc
index 9040db4..aa75080 100644
Binary files a/flake8/tests/__pycache__/_test_warnings.cpython-34.pyc and b/flake8/tests/__pycache__/_test_warnings.cpython-34.pyc differ
diff --git a/flake8/tests/__pycache__/test_engine.cpython-34.pyc b/flake8/tests/__pycache__/test_engine.cpython-34.pyc
index f822087..29394c6 100644
Binary files a/flake8/tests/__pycache__/test_engine.cpython-34.pyc and b/flake8/tests/__pycache__/test_engine.cpython-34.pyc differ
diff --git a/flake8/tests/__pycache__/test_hooks.cpython-34.pyc b/flake8/tests/__pycache__/test_hooks.cpython-34.pyc
index 5648aea..9aa26a5 100644
Binary files a/flake8/tests/__pycache__/test_hooks.cpython-34.pyc and b/flake8/tests/__pycache__/test_hooks.cpython-34.pyc differ
diff --git a/flake8/tests/__pycache__/test_integration.cpython-34.pyc b/flake8/tests/__pycache__/test_integration.cpython-34.pyc
index b0083ec..10a6f11 100644
Binary files a/flake8/tests/__pycache__/test_integration.cpython-34.pyc and b/flake8/tests/__pycache__/test_integration.cpython-34.pyc differ
diff --git a/flake8/tests/__pycache__/test_main.cpython-34.pyc b/flake8/tests/__pycache__/test_main.cpython-34.pyc
index f9021b1..4841663 100644
Binary files a/flake8/tests/__pycache__/test_main.cpython-34.pyc and b/flake8/tests/__pycache__/test_main.cpython-34.pyc differ
diff --git a/flake8/tests/__pycache__/test_pyflakes.cpython-34.pyc b/flake8/tests/__pycache__/test_pyflakes.cpython-34.pyc
index 65492a6..d66f1e5 100644
Binary files a/flake8/tests/__pycache__/test_pyflakes.cpython-34.pyc and b/flake8/tests/__pycache__/test_pyflakes.cpython-34.pyc differ
diff --git a/flake8/tests/__pycache__/test_reporter.cpython-34.pyc b/flake8/tests/__pycache__/test_reporter.cpython-34.pyc
index add2753..0c4060a 100644
Binary files a/flake8/tests/__pycache__/test_reporter.cpython-34.pyc and b/flake8/tests/__pycache__/test_reporter.cpython-34.pyc differ
diff --git a/flake8/tests/__pycache__/test_util.cpython-34.pyc b/flake8/tests/__pycache__/test_util.cpython-34.pyc
index 53fcf41..31667ab 100644
Binary files a/flake8/tests/__pycache__/test_util.cpython-34.pyc and b/flake8/tests/__pycache__/test_util.cpython-34.pyc differ
diff --git a/flake8/tests/_test_warnings.py b/flake8/tests/_test_warnings.py
index 004a597..e329199 100644
--- a/flake8/tests/_test_warnings.py
+++ b/flake8/tests/_test_warnings.py
@@ -280,7 +280,7 @@ class IntegrationTestCaseWarnings(unittest.TestCase):
             with open(self.this_file(), "r") as f:
                 return f.read()
 
-        with mock.patch("pep8.stdin_get_value", fake_stdin):
+        with mock.patch("pycodestyle.stdin_get_value", fake_stdin):
             (style_guide,
              report,
              collected_warnings,
diff --git a/flake8/tests/_test_warnings.pyc b/flake8/tests/_test_warnings.pyc
index fb374cb..28cd100 100644
Binary files a/flake8/tests/_test_warnings.pyc and b/flake8/tests/_test_warnings.pyc differ
diff --git a/flake8/tests/test_engine.py b/flake8/tests/test_engine.py
index 82ba0dd..5feafe1 100644
--- a/flake8/tests/test_engine.py
+++ b/flake8/tests/test_engine.py
@@ -8,7 +8,7 @@ except ImportError:
     import mock  # < PY33
 
 from flake8 import engine, util, __version__, reporter
-import pep8
+import pycodestyle as pep8
 
 
 class TestEngine(unittest.TestCase):
@@ -48,7 +48,7 @@ class TestEngine(unittest.TestCase):
             StyleGuide.assert_called_once_with(**{'parser': m, 'foo': 'bar'})
 
     def test_register_extensions(self):
-        with mock.patch('pep8.register_check') as register_check:
+        with mock.patch('pycodestyle.register_check') as register_check:
             registered_exts = engine._register_extensions()
             self.assertTrue(isinstance(registered_exts[0], util.OrderedSet))
             self.assertTrue(len(registered_exts[0]) > 0)
@@ -72,7 +72,7 @@ class TestEngine(unittest.TestCase):
         # setup
         re = self.start_patch('flake8.engine._register_extensions')
         gpv = self.start_patch('flake8.engine.get_python_version')
-        pgp = self.start_patch('pep8.get_parser')
+        pgp = self.start_patch('pycodestyle.get_parser')
         m = mock.Mock()
         re.return_value = ([('pyflakes', '0.7'), ('mccabe', '0.2')], [], [],
                            [])
diff --git a/flake8/tests/test_engine.pyc b/flake8/tests/test_engine.pyc
index a6a6999..f52aef3 100644
Binary files a/flake8/tests/test_engine.pyc and b/flake8/tests/test_engine.pyc differ
diff --git a/flake8/tests/test_git_hook.pyc b/flake8/tests/test_git_hook.pyc
deleted file mode 100644
index d033fb6..0000000
Binary files a/flake8/tests/test_git_hook.pyc and /dev/null differ
diff --git a/flake8/tests/test_hooks.pyc b/flake8/tests/test_hooks.pyc
index 5d2641f..4d87a15 100644
Binary files a/flake8/tests/test_hooks.pyc and b/flake8/tests/test_hooks.pyc differ
diff --git a/flake8/tests/test_integration.py b/flake8/tests/test_integration.py
index d1417c6..f82a769 100644
--- a/flake8/tests/test_integration.py
+++ b/flake8/tests/test_integration.py
@@ -64,7 +64,7 @@ class IntegrationTestCase(unittest.TestCase):
             with open(self.this_file(), "r") as f:
                 return f.read()
 
-        with mock.patch("pep8.stdin_get_value", fake_stdin):
+        with mock.patch("pycodestyle.stdin_get_value", fake_stdin):
             guide, report = self.check_files(arglist=['--jobs=4'],
                                              explicit_stdin=True)
         self.assertEqual(self.count, 1)
@@ -72,7 +72,7 @@ class IntegrationTestCase(unittest.TestCase):
     def test_stdin_fail(self):
         def fake_stdin():
             return "notathing\n"
-        with mock.patch("pep8.stdin_get_value", fake_stdin):
+        with mock.patch("pycodestyle.stdin_get_value", fake_stdin):
             # only assert needed is in check_files
             guide, report = self.check_files(arglist=['--jobs=4'],
                                              explicit_stdin=True,
diff --git a/flake8/tests/test_integration.pyc b/flake8/tests/test_integration.pyc
index ae2951d..743a3b0 100644
Binary files a/flake8/tests/test_integration.pyc and b/flake8/tests/test_integration.pyc differ
diff --git a/flake8/tests/test_main.pyc b/flake8/tests/test_main.pyc
index d6b470d..770de2f 100644
Binary files a/flake8/tests/test_main.pyc and b/flake8/tests/test_main.pyc differ
diff --git a/flake8/tests/test_pyflakes.pyc b/flake8/tests/test_pyflakes.pyc
index e31372b..767df8b 100644
Binary files a/flake8/tests/test_pyflakes.pyc and b/flake8/tests/test_pyflakes.pyc differ
diff --git a/flake8/tests/test_reporter.pyc b/flake8/tests/test_reporter.pyc
index d02f8d3..631f40d 100644
Binary files a/flake8/tests/test_reporter.pyc and b/flake8/tests/test_reporter.pyc differ
diff --git a/flake8/tests/test_util.py b/flake8/tests/test_util.py
index 32a1d44..221a98e 100644
--- a/flake8/tests/test_util.py
+++ b/flake8/tests/test_util.py
@@ -1,85 +1,120 @@
+import optparse
 import unittest
 
 from flake8.util import option_normalizer
 
 
-class TestOptionSerializer(unittest.TestCase):
+class TestOptionSerializerParsesTrue(unittest.TestCase):
+
+    def setUp(self):
+        self.option = optparse.Option('--foo', action='store_true')
+        self.option_name = 'fake_option'
 
     def test_1_is_true(self):
-        option = option_normalizer('1')
-        self.assertTrue(option)
+        value = option_normalizer('1', self.option, self.option_name)
+        self.assertTrue(value)
 
     def test_T_is_true(self):
-        option = option_normalizer('T')
-        self.assertTrue(option)
+        value = option_normalizer('T', self.option, self.option_name)
+        self.assertTrue(value)
 
     def test_TRUE_is_true(self):
-        option = option_normalizer('TRUE')
-        self.assertTrue(option, True)
+        value = option_normalizer('TRUE', self.option, self.option_name)
+        self.assertTrue(value, True)
 
     def test_ON_is_true(self):
-        option = option_normalizer('ON')
-        self.assertTrue(option)
+        value = option_normalizer('ON', self.option, self.option_name)
+        self.assertTrue(value)
 
     def test_t_is_true(self):
-        option = option_normalizer('t')
-        self.assertTrue(option)
+        value = option_normalizer('t', self.option, self.option_name)
+        self.assertTrue(value)
 
     def test_true_is_true(self):
-        option = option_normalizer('true')
-        self.assertTrue(option)
+        value = option_normalizer('true', self.option, self.option_name)
+        self.assertTrue(value)
 
     def test_on_is_true(self):
-        option = option_normalizer('on')
-        self.assertTrue(option)
+        value = option_normalizer('on', self.option, self.option_name)
+        self.assertTrue(value)
+
+
+class TestOptionSerializerParsesFalse(unittest.TestCase):
+
+    def setUp(self):
+        self.option = optparse.Option('--foo', action='store_true')
+        self.option_name = 'fake_option'
 
     def test_0_is_false(self):
-        option = option_normalizer('0')
-        self.assertFalse(option)
+        value = option_normalizer('0', self.option, self.option_name)
+        self.assertFalse(value)
 
     def test_F_is_false(self):
-        option = option_normalizer('F')
-        self.assertFalse(option)
+        value = option_normalizer('F', self.option, self.option_name)
+        self.assertFalse(value)
 
     def test_FALSE_is_false(self):
-        option = option_normalizer('FALSE')
-        self.assertFalse(option)
+        value = option_normalizer('FALSE', self.option, self.option_name)
+        self.assertFalse(value)
 
     def test_OFF_is_false(self):
-        option = option_normalizer('OFF')
-        self.assertFalse(option)
+        value = option_normalizer('OFF', self.option, self.option_name)
+        self.assertFalse(value)
 
     def test_f_is_false(self):
-        option = option_normalizer('f')
-        self.assertFalse(option)
+        value = option_normalizer('f', self.option, self.option_name)
+        self.assertFalse(value)
 
     def test_false_is_false(self):
-        option = option_normalizer('false')
-        self.assertFalse(option)
+        value = option_normalizer('false', self.option, self.option_name)
+        self.assertFalse(value)
 
     def test_off_is_false(self):
-        option = option_normalizer('off')
-        self.assertFalse(option)
+        value = option_normalizer('off', self.option, self.option_name)
+        self.assertFalse(value)
+
 
-    def test_parses_lists(self):
-        answer = ['F401', 'F402', 'F403', 'F404']
+class TestOptionSerializerParsesLists(unittest.TestCase):
 
-        option = option_normalizer('F401,F402,F403,F404')
-        self.assertEqual(option, answer)
+    def setUp(self):
+        self.option = optparse.Option('--select')
+        self.option_name = 'select'
+        self.answer = ['F401', 'F402', 'F403', 'F404', 'F405']
 
-        option = option_normalizer('F401 ,F402 ,F403 ,F404')
-        self.assertEqual(option, answer)
+    def test_parses_simple_comma_separated_lists(self):
+        value = option_normalizer('F401,F402,F403,F404,F405', self.option,
+                                  self.option_name)
+        self.assertEqual(value, self.answer)
 
-        option = option_normalizer('F401, F402, F403, F404')
-        self.assertEqual(option, answer)
+    def test_parses_less_simple_comma_separated_lists(self):
+        value = option_normalizer('F401 ,F402 ,F403 ,F404, F405', self.option,
+                                  self.option_name)
+        self.assertEqual(value, self.answer)
 
-        option = option_normalizer('''\
+        value = option_normalizer('F401, F402, F403, F404, F405', self.option,
+                                  self.option_name)
+        self.assertEqual(value, self.answer)
+
+    def test_parses_comma_separated_lists_with_newlines(self):
+        value = option_normalizer('''\
             F401,
             F402,
             F403,
             F404,
-        ''')
-        self.assertEqual(option, answer)
+            F405,
+        ''', self.option, self.option_name)
+        self.assertEqual(value, self.answer)
+
+
+class TestOptionSerializerParsesInts(unittest.TestCase):
+
+    def setUp(self):
+        self.option = optparse.Option('--max-complexity', type='int')
+        self.option_name = 'max_complexity'
+
+    def test_parses_an_int(self):
+        value = option_normalizer('2', self.option, self.option_name)
+        self.assertEqual(value, 2)
 
 
 if __name__ == '__main__':
diff --git a/flake8/tests/test_util.pyc b/flake8/tests/test_util.pyc
index 867fc74..4f3b2e6 100644
Binary files a/flake8/tests/test_util.pyc and b/flake8/tests/test_util.pyc differ
diff --git a/flake8/util.py b/flake8/util.py
index da33f42..2751f6b 100644
--- a/flake8/util.py
+++ b/flake8/util.py
@@ -1,5 +1,6 @@
 # -*- coding: utf-8 -*-
 import os
+import sys
 
 try:
     import ast
@@ -54,16 +55,27 @@ def warn_when_using_jobs(options):
 
 
 def force_disable_jobs(styleguide):
-    return is_windows() or is_using_stdin(styleguide.paths)
-
-
-def option_normalizer(value):
-    if str(value).upper() in ('1', 'T', 'TRUE', 'ON'):
-        value = True
-    if str(value).upper() in ('0', 'F', 'FALSE', 'OFF'):
-        value = False
-
-    if isinstance(value, str):
-        value = [opt.strip() for opt in value.split(',') if opt.strip()]
+    affected_mp_version = (sys.version_info <= (2, 7, 11) or
+                           (3, 0) <= sys.version_info < (3, 2))
+    return (is_windows() and affected_mp_version or
+            is_using_stdin(styleguide.paths))
+
+
+INT_TYPES = ('int', 'count')
+BOOL_TYPES = ('store_true', 'store_false')
+LIST_OPTIONS = ('select', 'ignore', 'exclude', 'enable_extensions')
+
+
+def option_normalizer(value, option, option_name):
+    if option.action in BOOL_TYPES:
+        if str(value).upper() in ('1', 'T', 'TRUE', 'ON'):
+            value = True
+        if str(value).upper() in ('0', 'F', 'FALSE', 'OFF'):
+            value = False
+    elif option.type in INT_TYPES:
+        value = int(value)
+    elif option_name in LIST_OPTIONS:
+        if isinstance(value, str):
+            value = [opt.strip() for opt in value.split(',') if opt.strip()]
 
     return value
diff --git a/flake8/util.pyc b/flake8/util.pyc
index f687611..56fc07d 100644
Binary files a/flake8/util.pyc and b/flake8/util.pyc differ
diff --git a/setup.cfg b/setup.cfg
index bd35539..6c71b61 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,7 +2,7 @@
 universal = 1
 
 [egg_info]
-tag_svn_revision = 0
-tag_date = 0
 tag_build = 
+tag_date = 0
+tag_svn_revision = 0
 
diff --git a/setup.py b/setup.py
index fab5e86..653ba01 100644
--- a/setup.py
+++ b/setup.py
@@ -49,9 +49,9 @@ setup(
     url="https://gitlab.com/pycqa/flake8",
     packages=["flake8", "flake8.tests"],
     install_requires=[
-        "pyflakes >= 0.8.1, < 1.1",
-        "pep8 >= 1.5.7, != 1.6.0, != 1.6.1, != 1.6.2",
-        "mccabe >= 0.2.1, < 0.5",
+        "pyflakes >= 0.8.1, < 1.3, != 1.2.0, != 1.2.1, != 1.2.2",
+        "pycodestyle >= 2.0, < 2.1",
+        "mccabe >= 0.2.1, < 0.6",
     ],
     entry_points={
         'distutils.commands': ['flake8 = flake8.main:Flake8Command'],

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