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: 5.0.3
Choose a base ref
...
head repository: PyCQA/flake8
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5.0.4
Choose a head ref
  • 7 commits
  • 6 files changed
  • 3 contributors

Commits on Aug 2, 2022

  1. [pre-commit.ci] pre-commit autoupdate

    updates:
    - [github.com/asottile/pyupgrade: v2.37.2 → v2.37.3](asottile/pyupgrade@v2.37.2...v2.37.3)
    - [github.com/PyCQA/flake8: 4.0.1 → 5.0.3](4.0.1...5.0.3)
    pre-commit-ci[bot] authored Aug 2, 2022
    Copy the full SHA
    84d56a8 View commit details
  2. Merge pull request #1649 from PyCQA/pre-commit-ci-update-config

    [pre-commit.ci] pre-commit autoupdate
    asottile authored Aug 2, 2022
    Copy the full SHA
    7160561 View commit details
  3. Clarify entry point naming

    Clarified what is and is not a valid entry point name
    for registering plugins.
    tlevi-nokia authored and asottile committed Aug 2, 2022
    Copy the full SHA
    7b8b374 View commit details
  4. Merge pull request #1646 from televi/main

    Clarify entry point naming
    asottile authored Aug 2, 2022
    Copy the full SHA
    318a86a View commit details

Commits on Aug 3, 2022

  1. Copy the full SHA
    e94ee2b View commit details
  2. Merge pull request #1653 from asottile/lower-bound-importlib-metadata

    require sufficiently new importlib-metadata
    asottile authored Aug 3, 2022
    Copy the full SHA
    213e006 View commit details
  3. Release 5.0.4

    asottile committed Aug 3, 2022
    Copy the full SHA
    6027577 View commit details
Showing with 32 additions and 6 deletions.
  1. +2 −2 .pre-commit-config.yaml
  2. +12 −2 docs/source/plugin-development/registering-plugins.rst
  3. +15 −0 docs/source/release-notes/5.0.4.rst
  4. +1 −0 docs/source/release-notes/index.rst
  5. +1 −1 setup.cfg
  6. +1 −1 src/flake8/__init__.py
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ repos:
- id: reorder-python-imports
args: [--application-directories, '.:src', --py36-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.2
rev: v2.37.3
hooks:
- id: pyupgrade
args: [--py36-plus]
@@ -23,7 +23,7 @@ repos:
- id: black
args: [--line-length=79]
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 5.0.3
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
14 changes: 12 additions & 2 deletions docs/source/plugin-development/registering-plugins.rst
Original file line number Diff line number Diff line change
@@ -112,11 +112,17 @@ look like::

X101 = flake8_example:ExamplePlugin

In the above case, the entry-point name and the error code produced by your
plugin are the same.

If your plugin reports several error codes that all start with ``X10``, then
it would look like::

X10 = flake8_example:ExamplePlugin

In this casae as well as the following case, your entry-point name acts as
a prefix to the error codes produced by your plugin.

If all of your plugin's error codes start with ``X1`` then it would look
like::

@@ -130,8 +136,12 @@ in the users environment. Selecting an entry point that is already used can
cause plugins to be deactivated without warning!

**Please Note:** Your entry point does not need to be exactly 4 characters
as of |Flake8| 3.0. *Consider using an entry point with 3 letters followed
by 3 numbers (i.e.* ``ABC123`` *).*
as of |Flake8| 3.0. Single letter entry point prefixes (such as the
'X' in the examples above) have caused issues in the past. As such,
please consider using a 2 or 3 character entry point prefix,
i.e., ``ABC`` is better than ``A`` but ``ABCD`` is invalid.
*A 3 letters entry point prefix followed by 3 numbers (i.e.* ``ABC123`` *)
is currently the longest allowed entry point name.*


.. _Entry Points:
15 changes: 15 additions & 0 deletions docs/source/release-notes/5.0.4.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
5.0.4 -- 2022-08-03
-------------------

You can view the `5.0.4 milestone`_ on GitHub for more details.

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

- Set a lower bound on ``importlib-metadata`` to prevent ``RecursionError``
(See also :issue:`1650`, :pull:`1653`).


.. all links
.. _5.0.4 milestone:
https://github.com/PyCQA/flake8/milestone/46
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::
5.0.4
5.0.3
5.0.2
5.0.1
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ install_requires =
mccabe>=0.7.0,<0.8.0
pycodestyle>=2.9.0,<2.10.0
pyflakes>=2.5.0,<2.6.0
importlib-metadata<4.3;python_version<"3.8"
importlib-metadata>=1.1.0,<4.3;python_version<"3.8"
python_requires = >=3.6.1

[options.packages.find]
2 changes: 1 addition & 1 deletion src/flake8/__init__.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())

__version__ = "5.0.3"
__version__ = "5.0.4"
__version_info__ = tuple(int(i) for i in __version__.split(".") if i.isdigit())

_VERBOSITY_TO_LOG_LEVEL = {