[pydocstyle]
inherit=false
# Ignore all preselected error codes
select=
# Known error codes
# https://pydocstyle.readthedocs.io/en/latest/error_codes.html
#
# Descriptions of default ON error codes
# D201 - No blank lines allowed before function docstring
# D204 - 1 blank line required after class docstring
# D206 - Docstring should be indented with spaces, not tabs
# D207 - Docstring is under-indented
# D208 - Docstring is over-indented
# D209 - Multi-line docstring closing quotes should be on a separate line
# D210 - No whitespaces allowed surrounding docstring text
# D211 - No blank lines allowed before class docstring
# D300 - Use """triple double quotes"""
#
# Default OFF
# D202 - No blank lines allowed after function docstring (found 1)
#   - not convinced that this improves readability
# D203 - 1 blank line required before class docstring
#   - incompatible with D211
#
# Temporary OFF - needs more time to fix
# D301 - Use r""" if any backslashes in a docstring
add-select=D201,D204,D206,D207,D208,D209,D210,D211,D300
# If we need to exlude tests uncomment this
match-dir=(?!build).*

[pycodestyle]
max-line-length=84
# .svn,CVS,.bzr,.hg,.git,__pycache__ - restore defaults
# migrations - autogenerated, so we don't really want to edit them
# docs/conf.py - mostly supplied by Sphinx
# _build - documentation build directory
# .tox - exclude any tox installed files
# pootle/static - js, CSS and images
# pootle/translations - project translations
# pootle/locale - Pootle UI translations
# pootle/assets - built static files
# templates - HTML templates
exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,conf.py,_build,.tox,selector.py,mozilla-l10n,build,env,build,dist
# E129 visually indented line with same indent as next logical line
#   - No real agreement here.  Best to disable it for now
# E226 missing whitespace around arithmetic operator
#   - This makes split[a+1:b+1] look unreadble as split[a + 1:b + 1]
# E402 module level import not at top of file
#   - There are enough cases where we want to import in a function
# W503 line break before binary operator
#   - Jury is out on what is actualy more readable
# E731 do not assign a lambda expression, use a def
#   - Not sure this is really correct, till then its off
# Future cleanups, temporary disabled
# E501 line length
#   - Way too much noise
# E265 block comment should start with '# '
# E266 too many leading '#' for block comment
#   - Way too much noise, likely commented out code
#   - Not something to cleanup just yet
# E741 ambiguous variable name
#   - Require some thought to cleanup
# Default ignore list for ref E121,E123,E126,E226,E24,E704
ignore=E203,E129,E226,E402,E731,W503,E501,E265,E266,E741,W504,W605
statistics=True

[flake8]
# See [pycodestyle] above, [pycodestyle] is the reference, please keep in sync.
# You would think flake8 would have the decency of reading the pycodestyle
# configs, but it doesn't so we have to repeat them.
max-line-length=84
exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,conf.py,_build,.tox,selector.py,mozilla-l10n,build,env,build,dist
# Additional default excludes:
# N - naming plugin
#  E203 - see https://github.com/psf/black/issues/315
ignore=E203,E129,E226,E402,E731,W503,N,E265,E501,E266,E741,W504
statistics=True
per-file-ignores =
  translate/storage/placeables/__init__.py:F401,F403
  translate/storage/po.py:F401,F403
# /end [pycodestyle] duplication

[isort]
# Settings:
# https://github.com/timothycrosley/isort/wiki/isort-Settings#full-reference-of-isort-settings

# black compatible settings:
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
ensure_newline_before_comments = True
line_length = 88

known_standard_library=
known_third_party=iniparse,lxml,vobject,sphinx,pytest,cheroot,phply,bs4,ruamel,pyparsing,setuptools
known_first_party=translate
default_section=FIRSTPARTY
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
# Separate sections within "from" imports for CONSTANTS, Classes, and
# modules/functions.
order_by_type=True
# Combine as imports on the same line within for import statements. By default
# isort forces all as imports to display on their own lines.
combine_as_imports=True
lines_after_imports=2
