-
Notifications
You must be signed in to change notification settings - Fork 288
/
setup.cfg
212 lines (206 loc) · 8.21 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
[tool:pytest]
python_files=*.py
addopts=--tb=short --strict
testpaths=tests
norecursedirs=.git _build tmp* requirements commands/*
markers=
cmd: Django admin commands.
filterwarnings =
# Error by default
error
## Deprecation related issues:
## * Not clean:
## - default - in our own code till they are fixed (we can see what we
## need to fix, but builds don't break)
## - ignore - in other's code (no noise please, clean ours first)
## * Clean:
## - error - in our own code (don't regress)
## - default - in other's code if they are not fixed. Be specific about
## what module so we don't allow other brokenness in (able to watch
## others fixing their code, don't hide it)
## - error - if we have no occurances in our's or other's code (keep it
## clean - should essentially not be listed and falls to default error
## behaviour)
#
## Note: Sadly can't use RemovedInDjango20Warning directly
#
## Add new suppresions in the sections below:
# See https://docs.python.org/2/library/warnings.html#the-warnings-filter
# action:message:category:module:lineno
#
## Not Clean
default:.*load_template_sources\(\) method is deprecated..*
#
## Clean
#
## Other
ignore:With-statements now directly support multiple context managers:DeprecationWarning:.*contextmanagers
ignore:Not importing directory '.*pootle/pootle/assets'. missing __init__.py:ImportWarning
ignore:Not importing directory '.*pootle/apps/.*/migrations'. missing __init__.py:ImportWarning
ignore:Not importing directory '.*pootle/apps/.*/templatetags'. missing __init__.py:ImportWarning
[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"""
# D301 - Use r""" if any backslashes in a docstring
# D302 - Use u""" for Unicode docstrings
#
# 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
add-select=D201,D204,D206,D207,D208,D209,D210,D211,D300,D301,D302
# If we need to exlude tests uncomment this
#match-dir=(?!tests).*
[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
# .eggs - some sideeffect of ./setup.py build
# env - virtualenv likely around from following setup instructions
# build - setuptools build dir
# dist - seuptools dist/ delivery dir
exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,migrations,conf.py,_build,.tox,pootle/static,pootle/translations,pootle/locale,pootle/assets,templates,.eggs,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
# E731 do not assign a lambda expression, use a def
# - Jury out on this one, there are enough that seem reasonable use of lambda
# W503 line break before binary operator
# - Jury is out on what is actualy more readable
# Default ignore list for ref E121,E123,E126,E226,E24,E704
ignore=E129,E226,E402,E731,W503
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__,migrations,conf.py,_build,.tox,pootle/static,pootle/translations,pootle/locale,pootle/assets,templates,.eggs,env,build,dist
# Additional default excludes:
# I - import plugin
# N - naming plugin
ignore=E129,E226,E402,E731,W503,I,N
statistics=True
# /end [pycodestyle] duplication
[isort]
# Settings:
# https://github.com/timothycrosley/isort/wiki/isort-Settings#full-reference-of-isort-settings
line_length=79
# Skip:
## Various other dirs
# - .tox - testing remnants
# - .eggs
# - dist - setuptools dirs
# - migrations - Django migrations autogenerated
# - node_modules - we don't care for Python in JS
## Our Pootle related dirs
# - commands - management command have code within import block
# - tests - limit to Pootle code for now
## Specific files
# - conf.py - docs/conf.py, Sphinx one is a mess
# - plugin.py - lots of custom sorting
# - others - can't autosort, manually sorted, try block, or special sorting
skip=.tox,
.eggs,
dist,
migrations,
node_modules,
commands,
tests,
conf.py,
pootle/apps/pootle_checks/receivers.py,
pootle/apps/pootle_checks/utils.py,
pootle/apps/pootle_data/getters.py,
pootle/apps/pootle_fs/forms.py
pootle/apps/pootle_fs/getters.py
pootle/apps/pootle_fs/plugin.py
pootle/apps/pootle_language/urls.py,
pootle/apps/pootle_language/views.py,
pootle/apps/pootle_log/getters.py
pootle/apps/pootle_log/utils.py
pootle/apps/pootle_profile/utils.py
pootle/apps/pootle_project/urls.py,
pootle/apps/pootle_project/views.py,
pootle/apps/pootle_revision/getters.py,
pootle/apps/pootle_store/contextmanagers.py
pootle/apps/pootle_score/getters.py
pootle/apps/pootle_store/forms.py,
pootle/apps/pootle_store/getters.py,
pootle/apps/pootle_store/models.py,
pootle/apps/pootle_store/providers.py
pootle/apps/pootle_store/unit/results.py,
pootle/apps/pootle_store/unit/timeline.py,
pootle/apps/pootle_store/utils.py
pootle/apps/pootle_store/views.py
pootle/apps/pootle_translationproject/contextmanagers.py
pootle/apps/pootle_translationproject/models.py,
pootle/apps/pootle_translationproject/urls.py,
pootle/apps/pootle_translationproject/views.py,
pootle/apps/virtualfolder/getters.py,
pootle/core/contextmanagers.py
pootle/core/management/subcommands.py,
pootle/core/search/backends/elasticsearch.py,
pootle/core/utils/version.py,
pootle/core/views/browse.py
pootle/middleware/errorpages.py,
pytest_pootle/fixtures/models/store.py
pytest_pootle/plugin.py
known_standard_library=
known_third_party=elasticsearch,translate,pytest_pootle
known_django=django
known_djangoexternal=allauth,contact_form,django_rq,django_comments,sortedm2m
known_first_party=staticpages,import_export,pootle_fs,pootle
default_section=FIRSTPARTY
sections=FUTURE,STDLIB,THIRDPARTY,DJANGO,DJANGOEXTERNAL,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 =
*/migrations/*
setup.py
.tox/*
tests/settings.py
run_coveralls.py
pootle/strings.py
pytest_pootle/__init__.py
pytest_pootle/plugin.py