# ref: https://flake8.pycqa.org/en/latest/user/configuration.html
#
# Note: this violates the documentation since it uses inline comments in the
# `ignore` and `select` lists, but it works and is cleaner.

[flake8]

ignore =
  E203,  # whitespace before `:`
  E501,  # Disable to use B950 for line-length
  W503,  # line break before binary operator

select =
  B,  # bugbear defaults
  B9,  # bugbear's more "opionated" warnings
  C4,  # comprehensions
  D,  # docstrings
  E,  # pycodestyle errors
  F,  # pyflakes
  RST,  # reST docstrings
  W,  # pycodestyle warnings
  W504,  # newline after binary operator

# Configure flake8-docstrings
docstring-convention = numpy

# Configure flake8-rst-docstrings
rst-roles =
  class,
  func,
  ref,
rst-directives =
  envvar,
  exception,
extend-ignore =
  RST201,  # FIXME? numpydoc compatibility
  RST301,  # FIXME? numpydoc compatibility
  RST307,  # Sphinx compatibility (directives w/ arguments)
