Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PyCQA/flake8
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.7.0
Choose a base ref
...
head repository: PyCQA/flake8
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.7.1
Choose a head ref
  • 3 commits
  • 5 files changed
  • 1 contributor

Commits on Jan 30, 2019

  1. Copy the full SHA
    0c470a6 View commit details
  2. Merge branch 'capitalized_filenames' into 'master'

    Allow capitalized filenames in per-file-ignores
    
    Closes #488
    
    See merge request pycqa/flake8!290
    asottile committed Jan 30, 2019
    Copy the full SHA
    ed3b133 View commit details
  3. Release 3.7.1

    asottile committed Jan 30, 2019
    Copy the full SHA
    f70ae10 View commit details
Showing with 35 additions and 5 deletions.
  1. +22 −0 docs/source/release-notes/3.7.1.rst
  2. +1 −0 docs/source/release-notes/index.rst
  3. +1 −1 src/flake8/__init__.py
  4. +1 −1 src/flake8/utils.py
  5. +10 −3 tests/unit/test_utils.py
22 changes: 22 additions & 0 deletions docs/source/release-notes/3.7.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
3.7.1 -- 2019-01-30
-------------------

You can view the `3.7.1 milestone`_ on GitLab for more details.

Bugs Fixed
~~~~~~~~~~

- Fix capitalized filenames in ``per-file-ignores`` setting (See also
`GitLab!290`_, `GitLab#488`_)

.. all links
.. _3.7.1 milestone:
https://gitlab.com/pycqa/flake8/milestones/24

.. issue links
.. _GitLab#488:
https://gitlab.com/pycqa/flake8/issues/488

.. merge request links
.. _GitLab!290:
https://gitlab.com/pycqa/flake8/merge_requests/290
1 change: 1 addition & 0 deletions docs/source/release-notes/index.rst
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ with the newest releases first.
==================

.. toctree::
3.7.1
3.7.0
3.6.0
3.5.0
2 changes: 1 addition & 1 deletion src/flake8/__init__.py
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())

__version__ = "3.7.0"
__version__ = "3.7.1"
__version_info__ = tuple(
int(i) for i in __version__.split(".") if i.isdigit()
)
2 changes: 1 addition & 1 deletion src/flake8/utils.py
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ def parse_comma_separated_list(value, regexp=COMMA_SEPARATED_LIST_RE):
_CODE, _FILE, _COLON, _COMMA, _WS = "code", "file", "colon", "comma", "ws"
_EOF = "eof"
_FILE_LIST_TOKEN_TYPES = [
(re.compile(r"[A-Z][0-9]*"), _CODE),
(re.compile(r"[A-Z][0-9]*(?=$|\s|,)"), _CODE),
(re.compile(r"[^\s:,]+"), _FILE),
(re.compile(r"\s*:\s*"), _COLON),
(re.compile(r"\s*,\s*"), _COMMA),
13 changes: 10 additions & 3 deletions tests/unit/test_utils.py
Original file line number Diff line number Diff line change
@@ -72,10 +72,18 @@ def test_parse_comma_separated_list(value, expected):
'f.py:\n E,F\ng.py:\n G,H',
[('f.py', ['E', 'F']), ('g.py', ['G', 'H'])],
),
# capitalized filenames are ok too
(
'F.py,G.py: F,G',
[('F.py', ['F', 'G']), ('G.py', ['F', 'G'])],
),
# it's easier to allow zero filenames or zero codes than forbid it
(':E', []), ('f.py:', []),
(':E f.py:F', [('f.py', ['F'])]),
('f.py: g.py:F', [('g.py', ['F'])]),
('f.py:E:', []),
('f.py:E.py:', []),
('f.py:Eg.py:F', [('Eg.py', ['F'])]),
# sequences are also valid (?)
(
['f.py:E,F', 'g.py:G,H'],
@@ -96,10 +104,9 @@ def test_parse_files_to_codes_mapping(value, expected):
# eof while looking for filenames
'f.py', 'f.py:E,g.py'
# colon while looking for codes
'f.py::', 'f.py:E:',
'f.py::',
# no separator between
'f.py:Eg.py:F', 'f.py:E1F1',
'f.py:E1F1',
),
)
def test_invalid_file_list(value):