; a generative tox configuration
; see: https://testrun.org/tox/en/latest/config.html#generative-envlist

[tox]
envlist =
    {py36,py37},
    quality,

[testenv]
basepython =
    py36: {env:TOXPYTHON:python3.6}
    py37: {env:TOXPYTHON:python3.7}
    quality: {env:TOXPYTHON:python3.6}
deps =
    pytest
commands =
    {posargs:pytest -vv tests}

[flake8]
count = True
statistics = True
max-line-length = 79
import-order-style = pycharm
application-import-names = tvmaze
no-accept-encodings = True
docstring-quotes = """
inline-quotes = '
multiline-quotes = '
per-file-ignores =
    __init__.py: D104

[testenv:quality]
deps =
    flake8
    flake8-coding
    flake8-commas
    flake8-docstrings
    flake8-import-order
    flake8-pep3101
    flake8-per-file-ignores
    flake8-quotes
    flake8-string-format
    flake8-tidy-imports
    hacking
    pep8-naming
skip_install = true
commands =
    flake8 --version
    flake8 src tests setup.py

; a generative tox configuration
; see: https://testrun.org/tox/en/latest/config.html#generative-envlist

[tox]
envlist =
    {py36,py37},
    quality,

[testenv]
basepython =
    py36: {env:TOXPYTHON:python3.6}
    py37: {env:TOXPYTHON:python3.7}
    quality: {env:TOXPYTHON:python3.6}
deps =
    pytest
commands =
    {posargs:pytest -vv tests}

[flake8]
count = True
statistics = True
max-line-length = 79
import-order-style = pycharm
application-import-names = tvmaze
no-accept-encodings = True
docstring-quotes = """
inline-quotes = '
multiline-quotes = '
per-file-ignores =
    __init__.py: D104

[testenv:quality]
deps =
    flake8
    flake8-coding
    flake8-commas
    flake8-comprehensions
    flake8-docstrings
    flake8-import-order
    flake8-pep3101
    flake8-per-file-ignores
    flake8-quotes
    flake8-string-format
    flake8-tidy-imports
    hacking
    pep8-naming
skip_install = true
commands =
    flake8 --version
    flake8 src tests setup.py

Add comprehension code quality tests
Add comprehension code quality tests

Adds the following error codes:

C400	Unnecessary generator - rewrite as a list comprehension.
C401	Unnecessary generator - rewrite as a set comprehension.
C402	Unnecessary generator - rewrite as a dict comprehension.
C403	Unnecessary list comprehension - rewrite as a set comprehension.
C404	Unnecessary list comprehension - rewrite as a dict comprehension.
C405	Unnecessary (list/tuple) literal - rewrite as a set literal.
C406	Unnecessary (list/tuple) literal - rewrite as a dict literal.
C407	Unnecessary list comprehension - '<builtin>' can take a generator.
C408	Unnecessary (dict/list/tuple) call - rewrite as a literal.
C409	Unnecessary (list/tuple) passed to tuple() - (remove the outer call to tuple()/rewrite as a tuple literal).
C410	Unnecessary (list/tuple) passed to list() - (remove the outer call to list()/rewrite as a list literal).
C411	Unnecessary list call - remove the outer call to list().
