Changelog
### 3.1.2
```
------------------
* Fix false positives in ``C416`` rule for list comprehensions returning
tuples.
```
### 3.1.1
```
------------------
* Fix false positives in ``C416`` rule for asynchronous comprehensions.
```
### 3.1.0
```
------------------
* Update Python support to 3.5-3.8.
* Fix false positives for C404 for list comprehensions not directly creating
tuples.
* Add ``C413`` rule that checks for unnecessary use of ``list()`` or
``reversed()`` around ``sorted()``.
* Add ``C414`` rule that checks for unnecessary use of the following:
* ``list()``, ``reversed()``, ``sorted()``, or ``tuple()`` within ``set``
or ``sorted()``
* ``list()`` or ``tuple()`` within ``list()`` or ``tuple()``
* ``set()`` within ``set``
* Add ``C415`` rule that checks for unnecessary reversal of an iterable via
subscript within ``reversed()``, ``set()``, or ``sorted()``.
* Add ``C416`` rule that checks for unnecessary list or set comprehensions that
can be rewritten using ``list()`` or ``set()``.
```
### 3.0.1
```
------------------
* Fix version display on ``flake8 --version`` (removing dependency on
``cached-property``). Thanks to Jon Dufresne.
```
### 3.0.0
```
------------------
* Update Flake8 support to 3.0+ only. 3.0.0 was released in 2016 and the plugin
hasn't been tested with it since.
```
### 2.3.0
```
------------------
* Converted setuptools metadata to configuration file. This meant removing the
``__version__`` attribute from the package. If you want to inspect the
installed version, use
``importlib.metadata.version("flake8-comprehensions")``
(`docs <https://docs.python.org/3.8/library/importlib.metadata.htmldistribution-versions>`__ /
`backport <https://pypi.org/project/importlib-metadata/>`__).
* Add dependencies on ``cached-property`` and ``importlib-metadata``.
* Fix false negatives in ``C407`` for cases when ``enumerate`` and ``sum()``
are passed more than one argument.
```
### 2.2.0
```
------------------
* Update Python support to 3.5-3.7, as 3.4 has reached its end of life.
* ``C412`` rule that complains about using list comprehension with ``in``.
```
### 2.1.0
```
------------------
* Add missing builtin ``enumerate`` to ``C407``.
```
### 2.0.0
```
------------------
* Drop Python 2 support, only Python 3.4+ is supported now.
```
### 1.4.1
```
------------------
* Fix false positives in ``C408`` for calls using ``*args`` or ``**kwargs``.
```
### 1.4.0
```
------------------
* Plugin now reserves the full ``C4XX`` code space rather than just ``C40X``
* ``C408`` rule that complains about using ``tuple()``, ``list()``, or
``dict()`` instead of a literal.
* ``C409`` and ``C410`` rules that complain about an unnecessary list or tuple
that could be rewritten as a literal.
* ``C411`` rule that complains about using list comprehension inside a
``list()`` call.
```
### 1.3.0
```
------------------
* Don't allow installation with Flake8 3.2.0 which doesn't enable the plugin.
This bug was fixed in Flake8 3.2.1.
* Prevent false positives of ``C402`` from generators of expressions that
aren't two-tuples.
* ``C405`` and ``C406`` now also complain about unnecessary tuple literals.
```
### 1.2.1
```
------------------
* ``C407`` rule that complains about unnecessary list comprehensions inside
builtins that can work on generators.
```
### 1.2.0
```
------------------
* Split all rule codes by type. This allows granular selection of the rules in
flake8 configuration.
```
### 1.1.1
```
------------------
* Fix crash on method calls
```
### 1.1.0
```
------------------
* ``C401`` rule that complains about unnecessary list comprehensions inside
calls to ``set()`` or ``dict()``.
* ``C402`` rule that complains about unnecessary list literals inside calls to
``set()`` or ``dict()``.
```
### 1.0.0
```
------------------
* ``C400`` rule that complains about an unnecessary usage of a generator when a
list/set/dict comprehension would do.
```
Links
- PyPI: https://pypi.org/project/flake8-comprehensions
- Changelog: https://pyup.io/changelogs/flake8-comprehensions/
- Repo: https://github.com/adamchainz/flake8-comprehensions
This PR pins flake8-comprehensions to the latest release 3.1.2.
Changelog
### 3.1.2 ``` ------------------ * Fix false positives in ``C416`` rule for list comprehensions returning tuples. ``` ### 3.1.1 ``` ------------------ * Fix false positives in ``C416`` rule for asynchronous comprehensions. ``` ### 3.1.0 ``` ------------------ * Update Python support to 3.5-3.8. * Fix false positives for C404 for list comprehensions not directly creating tuples. * Add ``C413`` rule that checks for unnecessary use of ``list()`` or ``reversed()`` around ``sorted()``. * Add ``C414`` rule that checks for unnecessary use of the following: * ``list()``, ``reversed()``, ``sorted()``, or ``tuple()`` within ``set`` or ``sorted()`` * ``list()`` or ``tuple()`` within ``list()`` or ``tuple()`` * ``set()`` within ``set`` * Add ``C415`` rule that checks for unnecessary reversal of an iterable via subscript within ``reversed()``, ``set()``, or ``sorted()``. * Add ``C416`` rule that checks for unnecessary list or set comprehensions that can be rewritten using ``list()`` or ``set()``. ``` ### 3.0.1 ``` ------------------ * Fix version display on ``flake8 --version`` (removing dependency on ``cached-property``). Thanks to Jon Dufresne. ``` ### 3.0.0 ``` ------------------ * Update Flake8 support to 3.0+ only. 3.0.0 was released in 2016 and the plugin hasn't been tested with it since. ``` ### 2.3.0 ``` ------------------ * Converted setuptools metadata to configuration file. This meant removing the ``__version__`` attribute from the package. If you want to inspect the installed version, use ``importlib.metadata.version("flake8-comprehensions")`` (`docs <https://docs.python.org/3.8/library/importlib.metadata.htmldistribution-versions>`__ / `backport <https://pypi.org/project/importlib-metadata/>`__). * Add dependencies on ``cached-property`` and ``importlib-metadata``. * Fix false negatives in ``C407`` for cases when ``enumerate`` and ``sum()`` are passed more than one argument. ``` ### 2.2.0 ``` ------------------ * Update Python support to 3.5-3.7, as 3.4 has reached its end of life. * ``C412`` rule that complains about using list comprehension with ``in``. ``` ### 2.1.0 ``` ------------------ * Add missing builtin ``enumerate`` to ``C407``. ``` ### 2.0.0 ``` ------------------ * Drop Python 2 support, only Python 3.4+ is supported now. ``` ### 1.4.1 ``` ------------------ * Fix false positives in ``C408`` for calls using ``*args`` or ``**kwargs``. ``` ### 1.4.0 ``` ------------------ * Plugin now reserves the full ``C4XX`` code space rather than just ``C40X`` * ``C408`` rule that complains about using ``tuple()``, ``list()``, or ``dict()`` instead of a literal. * ``C409`` and ``C410`` rules that complain about an unnecessary list or tuple that could be rewritten as a literal. * ``C411`` rule that complains about using list comprehension inside a ``list()`` call. ``` ### 1.3.0 ``` ------------------ * Don't allow installation with Flake8 3.2.0 which doesn't enable the plugin. This bug was fixed in Flake8 3.2.1. * Prevent false positives of ``C402`` from generators of expressions that aren't two-tuples. * ``C405`` and ``C406`` now also complain about unnecessary tuple literals. ``` ### 1.2.1 ``` ------------------ * ``C407`` rule that complains about unnecessary list comprehensions inside builtins that can work on generators. ``` ### 1.2.0 ``` ------------------ * Split all rule codes by type. This allows granular selection of the rules in flake8 configuration. ``` ### 1.1.1 ``` ------------------ * Fix crash on method calls ``` ### 1.1.0 ``` ------------------ * ``C401`` rule that complains about unnecessary list comprehensions inside calls to ``set()`` or ``dict()``. * ``C402`` rule that complains about unnecessary list literals inside calls to ``set()`` or ``dict()``. ``` ### 1.0.0 ``` ------------------ * ``C400`` rule that complains about an unnecessary usage of a generator when a list/set/dict comprehension would do. ```Links
- PyPI: https://pypi.org/project/flake8-comprehensions - Changelog: https://pyup.io/changelogs/flake8-comprehensions/ - Repo: https://github.com/adamchainz/flake8-comprehensions