forked from translate/translate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
115 lines (110 loc) · 4.31 KB
/
setup.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
[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=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:
# I - import plugin
# N - naming plugin
ignore=E129,E226,E402,E731,W503,I,N,E501,E265,E266,E741
statistics=True
# /end [pycodestyle] duplication
[isort]
# Settings:
# https://github.com/timothycrosley/isort/wiki/isort-Settings#full-reference-of-isort-settings
line_length=79
skip=docs,
selector.py,
known_standard_library=
known_third_party=iniparse,lxml,vobject,sphinx,pytest,cheroot,phply,bs4,ruamel,pyparsing
known_first_party=translate
default_section=FIRSTPARTY
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
# Number of spaces you would like to indent by
indent=4
# How you want imports to be displayed if they're long enough to span multiple
# lines. All possible modes can be found
# https://github.com/timothycrosley/isort#multi-line-output-modes.
# 0 - Grid
# from third_party import (lib1, lib2, lib3,
# lib4, lib5, ...)
multi_line_output=0
# 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
[coverage:run]
omit =
tests/*
translate/test_*
translate/*/test_*
translate/*/*/test_*
translate/misc/selector.py