[flake8]

builtins = _

# Print the total number of errors:
count = true

# Don't even try to analyze these:
extend-exclude =
  # No need to traverse egg info dir
  *.egg-info,
  # tool cache dirs
  *_cache
  # project env vars
  .env,
  # GitHub configs
  .github,
  # Cache files of MyPy
  .mypy_cache,
  # Cache files of pytest
  .pytest_cache,
  # Temp dir of pytest-testmon
  .tmontmp,
  # Occasional virtualenv dir
  .venv
  # VS Code
  .vscode,
  # Temporary build dir
  build,
  # This contains sdists and wheels
  dist,
  # Metadata of `pip wheel` cmd is autogenerated
  pip-wheel-metadata,
  # adjacent venv
  venv

# IMPORTANT: avoid using ignore option, always use extend-ignore instead
# Completely and unconditionally ignore the following errors:
extend-ignore =
  E203,  # annoy black by allowing white space before : https://github.com/psf/black/issues/315
  F401,  # duplicate of pylint W0611 (unused-import)
  F821,  # duplicate of pylint E0602 (undefined-variable)
  F841,  # duplicate of pylint W0612 (unused-variable)

# Accessibility/large fonts and PEP8 unfriendly:
max-line-length = 100

# Allow certain violations in certain files:
# Please keep both sections of this list sorted, as it will be easier for others to find and add entries in the future
per-file-ignores =
  # The following ignores have been researched and should be considered permanent
  # each should be preceeded with an explanation of each of the error codes
  # If other ignores are added for a specific file in the section following this,
  # these will need to be added to that line as well.

  # Q000: Allow single-quotes in _version.py because setuptools_scm will create it with them.
  src/pytest_ansible_units/_version.py: Q000
  # S101: Allow the use of assert within the tests directory, since tests require it.
  tests/**.py: S101

  # The following were present during the initial implementation.
  # They are expected to be fixed and unignored over time.
  #

# Count the number of occurrences of each error/warning code and print a report:
statistics = true

# flake8-quotes
# https://github.com/zheller/flake8-quotes
# keep at bottom of configuration because some IDEs
# may see the single double quote in the inline-quotes
# entry as an unterminated string and not properly
# highlight the remainder of the file
inline-quotes = "
