[tool.pylint]

    [tool.pylint.'MASTER']

    # Pickle collected data for later comparisons.
    persistent = true

    # Use multiple processes to speed up Pylint.
    jobs = 0

    # List of plugins (as comma separated values of python modules names) to load,
    # usually to register additional checkers.
    load-plugins = ['pylint.extensions.docparams']

    # Allow loading of arbitrary C extensions. Extensions are imported into the
    # active Python interpreter and may run arbitrary code.
    unsafe-load-any-extension = true

    [tool.pylint.'MESSAGES CONTROL']

    # Enable the message, report, category or checker with the given id(s). You can
    # either give multiple identifier separated by comma (,) or put this option
    # multiple time (only on the command line, not in the configuration file where
    # it should appear only once). See also the "--disable" option for examples.
    enable = [
        'spelling',
        'useless-suppression',
    ]

    # Disable the message, report, category or checker with the given id(s). You
    # can either give multiple identifiers separated by comma (,) or put this
    # option multiple times (only on the command line, not in the configuration
    # file where it should appear only once).You can also use "--disable=all" to
    # disable everything first and then reenable specific checks. For example, if
    # you want to run only the similarities checker, you can use "--disable=all
    # --enable=similarities". If you want to run only the classes checker, but have
    # no Warning level messages displayed, use"--disable=all --enable=classes
    # --disable=W"

    disable = [
        # Tests need `self` to be in a class but do not use it.
        'no-self-use',
        # Style issues that we can deal with ourselves
        'too-few-public-methods',
        'too-many-ancestors',
        'too-many-locals',
        'too-many-arguments',
        'too-many-instance-attributes',
        'too-many-return-statements',
        'too-many-lines',
        'too-many-statements',
        'locally-disabled',
        # Let flake8 handle long lines
        'line-too-long',
        # Let flake8 handle unused imports
        'unused-import',
        # Let isort deal with sorting
        'ungrouped-imports',
        # We don't need everything to be documented because of mypy
        'missing-type-doc',
        'missing-returns-doc',
        'missing-return-type-doc',
        # Let auto-formatters deal with this
        'bad-continuation',
        # Let auto-formatters deal with this
        'bad-whitespace',
        # Too difficult to please
        'duplicate-code',
        # Let isort handle imports
        'wrong-import-order',
    ]

    [tool.pylint.'FORMAT']

    # Allow the body of an if to be on the same line as the test if there is no
    # else.
    single-line-if-stmt = false

    [tool.pylint.'SPELLING']

    # Spelling dictionary name. Available dictionaries: none. To make it working
    # install python-enchant package.
    spelling-dict = 'en_US'

    # A path to a file that contains private dictionary; one word per line.
    spelling-private-dict-file = 'spelling_private_dict.txt'

    # Tells whether to store unknown words to indicated private dictionary in
    # --spelling-private-dict-file option instead of raising a message.
    spelling-store-unknown-words = 'no'

[tool.black]

line-length = 79
skip-string-normalization = true

[tool.isort]

multi_line_output = 3
include_trailing_comma = true

[tool.coverage.run]

branch = true

[tool.pytest.ini_options]

xfail_strict = true
log_cli = true
env_files = ["./vuforia_secrets.env"]

[tool.check-manifest]

ignore = [
  "*.enc",
  ".appveyor.yml",
  ".coveragerc",
  ".isort.cfg",
  ".markdownlint.json",
  ".pydocstyle",
  ".remarkrc",
  ".readthedocs.yml",
  "readthedocs.yaml",
  ".style.yapf",
  ".travis.yml",
  "CHANGELOG.rst",
  "CODE_OF_CONDUCT.rst",
  "CONTRIBUTING.rst",
  "LICENSE",
  "Makefile",
  "ci",
  "ci/**",
  "codecov.yaml",
  "doc8.ini",
  "docs",
  "docs/**",
  ".git_archival.txt",
  "mypy.ini",
  "pylintrc",
  "pytest.ini",
  "spelling_private_dict.txt",
  "tests",
  "tests-pylintrc",
  "tests/**",
  "vuforia_secrets.env.example",
  "lint.mk",
  "src/mock_vws/_flask_server/dockerfiles/*/Dockerfile",
  "secrets.tar.gpg",
]

[tool.mypy]

check_untyped_defs = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
follow_imports = "normal"
ignore_missing_imports = true
no_implicit_optional = true
strict_equality = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true

[tool.doc8]

max_line_length = 2000
ignore_path = [
    "./.eggs",
    "./docs/build",
    "./docs/build/spelling/output.txt",
    "./node_modules",
    "./src/*.egg-info/",
    "./src/*/_setuptools_scm_version.txt",
]

[tool.setuptools_scm]

# We use a fallback version like
# https://github.com/pypa/setuptools_scm/issues/77 so that we do not
# error in the Docker build stage of the release pipeline.
#
# This must be a PEP 440 compliant version.
fallback_version = "0.0.0"


[tool.pydocstyle]
# We do not have summary lines, care about "mood", or need sections with
# dash underlined titles.
ignore = [
  'D200',
  'D205',
  'D400',
  'D415',
  'D202',
  'D203',
  'D212',
  'D401',
  'D406',
  'D407',
  'D413',
]

[build-system]
requires = ["setuptools", "pip", "wheel"]
build-backend = "setuptools.build_meta"
