[build-system]
requires = ["setuptools", "wheel", "versioneer-518"]  # PEP 508 specifications.

######
# MyPy
######
# [tool.mypy] Waiting for new version of Mypy
# warn_unused_configs = true
# ignore_missing_imports = true
# pretty = true

#######
# Black
#######
[tool.black]
py39 = true
line-length = 88
include = '\.pyi?$'
exclude = '''
/(
    \.git
    | \.hg
    | \.mypy_cache
    | \.tox
    | \.venv
    | _build
    | buck-out
    | build
    | dist

    # The following are specific to Black, you probably don't want those.
    | blib2to3
    | tests/data
)/
'''

#######
# isort
#######
[tool.isort]
profile = "black"
line_length = 88
src_paths = ["src", "tests"]

########
# Pylint
########
[tool.pylint.messages_control]
ignore="migrations"
disable=[
    "line-too-long",
    "too-few-public-methods",
    "duplicate-code",
    "import-error",
    "unused-argument",
    "no-self-use",
    "import-outside-toplevel",
    "unsubscriptable-object", # Otherwise throws errors on certain Type annotations
    "too-many-arguments",
    "missing-module-docstring",
    "raise-missing-from",
    "fixme"]
extension-pkg-whitelist = ["pydantic", "zlib"]

[tool.pylint.reports]
reports="no"
output-format="colorized"

[tool.pylint.format]
max-line-length="88"

[tool.pylint.basic]
good-names="_,i,setUp,tearDown,maxDiff,default_app_config"

########
# Pytest
########
[tool.pytest.ini_options]
testpaths="tests"
log_level = "DEBUG"
addopts = ["--cov=fidesctl.ctl.core",
            "--cov=fidesctl.cli",
            "--cov-report=term-missing",
            "-vv",
            "--no-cov-on-fail",
            "--disable-pytest-warnings"]
markers = [
    "unit: only runs tests that don't require non-python dependencies (i.e. a database)",
    "integration: only runs tests that require application dependencies (i.e. a database)",
    "external: only runs tests that require access to non-docker, external services (i.e. Snowflake)",
    "postgres: only runs the integration tests for postgres",
    "mssql: only runs the integration tests for sqlserver/mssql",
    "mysql: only runs the integration tests for mysql"
]
asyncio_mode = "auto"
