Merge lp:~harlowja/cloud-init/tox-venvs into lp:~cloud-init-dev/cloud-init/trunk
- tox-venvs
- Merge into trunk
Proposed by
Joshua Harlow
Status: | Merged |
---|---|
Merge reported by: | Scott Moser |
Merged at revision: | not available |
Proposed branch: | lp:~harlowja/cloud-init/tox-venvs |
Merge into: | lp:~cloud-init-dev/cloud-init/trunk |
Diff against target: |
431 lines (+64/-284) 8 files modified
HACKING.rst (+2/-2) Makefile (+12/-26) pylintrc (+0/-19) test-requirements.txt (+1/-3) tools/hacking.py (+0/-170) tools/run-pep8 (+0/-38) tools/run-pylint (+0/-26) tox.ini (+49/-0) |
To merge this branch: | bzr merge lp:~harlowja/cloud-init/tox-venvs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Needs Fixing | |
cloud-init Commiters | Pending | ||
Review via email: mp+203225@code.launchpad.net |
Commit message
Description of the change
Use a venv for testing and for lint checking
To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote : | # |
Revision history for this message
Joshua Harlow (harlowja) wrote : | # |
Makes sense, I understand the need for both, will make a few tweaks to do that.
Revision history for this message
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:934
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
review:
Needs Fixing
(continuous-integration)
Revision history for this message
Scott Moser (smoser) wrote : | # |
marking this merged.
we use tox in trunk now.
if you think there is something missing, please propose a merge to cloud-init git.
thanks.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'HACKING.rst' | |||
2 | --- HACKING.rst 2013-02-05 07:10:36 +0000 | |||
3 | +++ HACKING.rst 2014-01-26 01:03:26 +0000 | |||
4 | @@ -19,9 +19,9 @@ | |||
5 | 19 | 19 | ||
6 | 20 | - ``bzr commit`` | 20 | - ``bzr commit`` |
7 | 21 | 21 | ||
9 | 22 | * Check pylint and pep8 and test, and address any issues: | 22 | * Check flake8 and test, and address any issues: |
10 | 23 | 23 | ||
12 | 24 | - ``make test pylint pep8`` | 24 | - ``make test flake8`` |
13 | 25 | 25 | ||
14 | 26 | * Push to launchpad to a personal branch: | 26 | * Push to launchpad to a personal branch: |
15 | 27 | 27 | ||
16 | 28 | 28 | ||
17 | === modified file 'Makefile' | |||
18 | --- Makefile 2014-01-20 18:50:04 +0000 | |||
19 | +++ Makefile 2014-01-26 01:03:26 +0000 | |||
20 | @@ -2,40 +2,27 @@ | |||
21 | 2 | PY_FILES=$(shell find cloudinit bin tests tools -name "*.py" -type f ) | 2 | PY_FILES=$(shell find cloudinit bin tests tools -name "*.py" -type f ) |
22 | 3 | PY_FILES+="bin/cloud-init" | 3 | PY_FILES+="bin/cloud-init" |
23 | 4 | 4 | ||
24 | 5 | PY_ENV=$(shell python -c 'import sys; print("py%s%s" % (sys.version_info[0:2]))') | ||
25 | 6 | |||
26 | 5 | YAML_FILES=$(shell find cloudinit bin tests tools -name "*.yaml" -type f ) | 7 | YAML_FILES=$(shell find cloudinit bin tests tools -name "*.yaml" -type f ) |
27 | 6 | YAML_FILES+=$(shell find doc/examples -name "cloud-config*.txt" -type f ) | 8 | YAML_FILES+=$(shell find doc/examples -name "cloud-config*.txt" -type f ) |
28 | 7 | 9 | ||
29 | 8 | CHANGELOG_VERSION=$(shell $(CWD)/tools/read-version) | 10 | CHANGELOG_VERSION=$(shell $(CWD)/tools/read-version) |
30 | 9 | CODE_VERSION=$(shell python -c "from cloudinit import version; print version.version_string()") | 11 | CODE_VERSION=$(shell python -c "from cloudinit import version; print version.version_string()") |
31 | 10 | 12 | ||
32 | 11 | PIP_INSTALL := pip install | ||
33 | 12 | |||
34 | 13 | ifeq ($(distro),) | 13 | ifeq ($(distro),) |
35 | 14 | distro = redhat | 14 | distro = redhat |
36 | 15 | endif | 15 | endif |
37 | 16 | 16 | ||
38 | 17 | all: test check_version | 17 | all: test check_version |
39 | 18 | 18 | ||
60 | 19 | pep8: | 19 | flake8: |
61 | 20 | @$(CWD)/tools/run-pep8 $(PY_FILES) | 20 | @echo "Running flake8 using tox..." |
62 | 21 | 21 | @tox -e flake8 $(PY_FILES) | |
63 | 22 | pylint: | 22 | |
64 | 23 | @$(CWD)/tools/run-pylint $(PY_FILES) | 23 | test: |
65 | 24 | 24 | @echo "Running tests for env=$(PY_ENV) using tox..." | |
66 | 25 | pyflakes: | 25 | @tox -e $(PY_ENV) |
47 | 26 | pyflakes $(PY_FILES) | ||
48 | 27 | |||
49 | 28 | pip-requirements: | ||
50 | 29 | @echo "Installing cloud-init dependencies..." | ||
51 | 30 | $(PIP_INSTALL) -r "$@.txt" -q | ||
52 | 31 | |||
53 | 32 | pip-test-requirements: | ||
54 | 33 | @echo "Installing cloud-init test dependencies..." | ||
55 | 34 | $(PIP_INSTALL) -r "$@.txt" -q | ||
56 | 35 | |||
57 | 36 | test: clean_pyc | ||
58 | 37 | @echo "Running tests..." | ||
59 | 38 | @nosetests $(noseopts) tests/ | ||
67 | 39 | 26 | ||
68 | 40 | check_version: | 27 | check_version: |
69 | 41 | @if [ "$(CHANGELOG_VERSION)" != "$(CODE_VERSION)" ]; then \ | 28 | @if [ "$(CHANGELOG_VERSION)" != "$(CODE_VERSION)" ]; then \ |
70 | @@ -44,13 +31,13 @@ | |||
71 | 44 | else true; fi | 31 | else true; fi |
72 | 45 | 32 | ||
73 | 46 | clean_pyc: | 33 | clean_pyc: |
75 | 47 | @find . -type f -name "*.pyc" -delete | 34 | find . -type f -name "*.pyc" -delete |
76 | 48 | 35 | ||
77 | 49 | 2to3: | 36 | 2to3: |
78 | 50 | 2to3 $(PY_FILES) | 37 | 2to3 $(PY_FILES) |
79 | 51 | 38 | ||
80 | 52 | clean: clean_pyc | 39 | clean: clean_pyc |
82 | 53 | rm -rf /var/log/cloud-init.log /var/lib/cloud/ | 40 | rm -rf /var/log/cloud-init.log /var/lib/cloud/ $(CWD)/*.egg-info $(CWD)/.tox |
83 | 54 | 41 | ||
84 | 55 | yaml: | 42 | yaml: |
85 | 56 | @$(CWD)/tools/validate-yaml.py $(YAML_FILES) | 43 | @$(CWD)/tools/validate-yaml.py $(YAML_FILES) |
86 | @@ -61,5 +48,4 @@ | |||
87 | 61 | deb: | 48 | deb: |
88 | 62 | ./packages/bddeb | 49 | ./packages/bddeb |
89 | 63 | 50 | ||
92 | 64 | .PHONY: test pylint pyflakes 2to3 clean pep8 rpm deb yaml check_version | 51 | .PHONY: test flake8 2to3 clean rpm deb yaml check_version clean_pyc |
91 | 65 | .PHONY: pip-test-requirements pip-requirements clean_pyc | ||
93 | 66 | 52 | ||
94 | === removed file 'pylintrc' | |||
95 | --- pylintrc 2012-10-28 02:25:48 +0000 | |||
96 | +++ pylintrc 1970-01-01 00:00:00 +0000 | |||
97 | @@ -1,19 +0,0 @@ | |||
98 | 1 | [General] | ||
99 | 2 | init-hook='import sys; sys.path.append("tests/")' | ||
100 | 3 | |||
101 | 4 | [MESSAGES CONTROL] | ||
102 | 5 | # See: http://pylint-messages.wikidot.com/all-codes | ||
103 | 6 | # W0142: *args and **kwargs are fine. | ||
104 | 7 | # W0511: TODOs in code comments are fine. | ||
105 | 8 | # W0702: No exception type(s) specified | ||
106 | 9 | # W0703: Catch "Exception" | ||
107 | 10 | # C0103: Invalid name | ||
108 | 11 | # C0111: Missing docstring | ||
109 | 12 | disable=W0142,W0511,W0702,W0703,C0103,C0111 | ||
110 | 13 | |||
111 | 14 | [REPORTS] | ||
112 | 15 | reports=no | ||
113 | 16 | include-ids=yes | ||
114 | 17 | |||
115 | 18 | [FORMAT] | ||
116 | 19 | max-line-length=79 | ||
117 | 20 | 0 | ||
118 | === modified file 'test-requirements.txt' | |||
119 | --- test-requirements.txt 2014-01-18 07:46:19 +0000 | |||
120 | +++ test-requirements.txt 2014-01-26 01:03:26 +0000 | |||
121 | @@ -1,6 +1,4 @@ | |||
122 | 1 | httpretty>=0.7.1 | 1 | httpretty>=0.7.1 |
123 | 2 | mocker | 2 | mocker |
124 | 3 | nose | 3 | nose |
128 | 4 | pep8 | 4 | hacking>=0.8.0,<0.9 |
126 | 5 | pyflakes | ||
127 | 6 | pylint | ||
129 | 7 | 5 | ||
130 | === removed file 'tools/hacking.py' | |||
131 | --- tools/hacking.py 2012-11-11 03:32:49 +0000 | |||
132 | +++ tools/hacking.py 1970-01-01 00:00:00 +0000 | |||
133 | @@ -1,170 +0,0 @@ | |||
134 | 1 | #!/usr/bin/env python | ||
135 | 2 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | ||
136 | 3 | |||
137 | 4 | # Copyright (c) 2012, Cloudscaling | ||
138 | 5 | # All Rights Reserved. | ||
139 | 6 | # | ||
140 | 7 | # Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
141 | 8 | # not use this file except in compliance with the License. You may obtain | ||
142 | 9 | # a copy of the License at | ||
143 | 10 | # | ||
144 | 11 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
145 | 12 | # | ||
146 | 13 | # Unless required by applicable law or agreed to in writing, software | ||
147 | 14 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
148 | 15 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
149 | 16 | # License for the specific language governing permissions and limitations | ||
150 | 17 | # under the License. | ||
151 | 18 | |||
152 | 19 | """cloudinit HACKING file compliance testing (based off of nova hacking.py) | ||
153 | 20 | |||
154 | 21 | built on top of pep8.py | ||
155 | 22 | """ | ||
156 | 23 | |||
157 | 24 | import inspect | ||
158 | 25 | import logging | ||
159 | 26 | import re | ||
160 | 27 | import sys | ||
161 | 28 | |||
162 | 29 | import pep8 | ||
163 | 30 | |||
164 | 31 | # Don't need this for testing | ||
165 | 32 | logging.disable('LOG') | ||
166 | 33 | |||
167 | 34 | # N1xx comments | ||
168 | 35 | # N2xx except | ||
169 | 36 | # N3xx imports | ||
170 | 37 | # N4xx docstrings | ||
171 | 38 | # N[5-9]XX (future use) | ||
172 | 39 | |||
173 | 40 | DOCSTRING_TRIPLE = ['"""', "'''"] | ||
174 | 41 | VERBOSE_MISSING_IMPORT = False | ||
175 | 42 | _missingImport = set([]) | ||
176 | 43 | |||
177 | 44 | |||
178 | 45 | def import_normalize(line): | ||
179 | 46 | # convert "from x import y" to "import x.y" | ||
180 | 47 | # handle "from x import y as z" to "import x.y as z" | ||
181 | 48 | split_line = line.split() | ||
182 | 49 | if (line.startswith("from ") and "," not in line and | ||
183 | 50 | split_line[2] == "import" and split_line[3] != "*" and | ||
184 | 51 | split_line[1] != "__future__" and | ||
185 | 52 | (len(split_line) == 4 or | ||
186 | 53 | (len(split_line) == 6 and split_line[4] == "as"))): | ||
187 | 54 | return "import %s.%s" % (split_line[1], split_line[3]) | ||
188 | 55 | else: | ||
189 | 56 | return line | ||
190 | 57 | |||
191 | 58 | |||
192 | 59 | def cloud_import_alphabetical(physical_line, line_number, lines): | ||
193 | 60 | """Check for imports in alphabetical order. | ||
194 | 61 | |||
195 | 62 | HACKING guide recommendation for imports: | ||
196 | 63 | imports in human alphabetical order | ||
197 | 64 | N306 | ||
198 | 65 | """ | ||
199 | 66 | # handle import x | ||
200 | 67 | # use .lower since capitalization shouldn't dictate order | ||
201 | 68 | split_line = import_normalize(physical_line.strip()).lower().split() | ||
202 | 69 | split_previous = import_normalize(lines[line_number - 2]) | ||
203 | 70 | split_previous = split_previous.strip().lower().split() | ||
204 | 71 | # with or without "as y" | ||
205 | 72 | length = [2, 4] | ||
206 | 73 | if (len(split_line) in length and len(split_previous) in length and | ||
207 | 74 | split_line[0] == "import" and split_previous[0] == "import"): | ||
208 | 75 | if split_line[1] < split_previous[1]: | ||
209 | 76 | return (0, "N306: imports not in alphabetical order (%s, %s)" | ||
210 | 77 | % (split_previous[1], split_line[1])) | ||
211 | 78 | |||
212 | 79 | |||
213 | 80 | def cloud_docstring_start_space(physical_line): | ||
214 | 81 | """Check for docstring not start with space. | ||
215 | 82 | |||
216 | 83 | HACKING guide recommendation for docstring: | ||
217 | 84 | Docstring should not start with space | ||
218 | 85 | N401 | ||
219 | 86 | """ | ||
220 | 87 | pos = max([physical_line.find(i) for i in DOCSTRING_TRIPLE]) # start | ||
221 | 88 | if (pos != -1 and len(physical_line) > pos + 1): | ||
222 | 89 | if (physical_line[pos + 3] == ' '): | ||
223 | 90 | return (pos, "N401: one line docstring should not start with" | ||
224 | 91 | " a space") | ||
225 | 92 | |||
226 | 93 | |||
227 | 94 | def cloud_todo_format(physical_line): | ||
228 | 95 | """Check for 'TODO()'. | ||
229 | 96 | |||
230 | 97 | HACKING guide recommendation for TODO: | ||
231 | 98 | Include your name with TODOs as in "#TODO(termie)" | ||
232 | 99 | N101 | ||
233 | 100 | """ | ||
234 | 101 | pos = physical_line.find('TODO') | ||
235 | 102 | pos1 = physical_line.find('TODO(') | ||
236 | 103 | pos2 = physical_line.find('#') # make sure it's a comment | ||
237 | 104 | if (pos != pos1 and pos2 >= 0 and pos2 < pos): | ||
238 | 105 | return pos, "N101: Use TODO(NAME)" | ||
239 | 106 | |||
240 | 107 | |||
241 | 108 | def cloud_docstring_one_line(physical_line): | ||
242 | 109 | """Check one line docstring end. | ||
243 | 110 | |||
244 | 111 | HACKING guide recommendation for one line docstring: | ||
245 | 112 | A one line docstring looks like this and ends in a period. | ||
246 | 113 | N402 | ||
247 | 114 | """ | ||
248 | 115 | pos = max([physical_line.find(i) for i in DOCSTRING_TRIPLE]) # start | ||
249 | 116 | end = max([physical_line[-4:-1] == i for i in DOCSTRING_TRIPLE]) # end | ||
250 | 117 | if (pos != -1 and end and len(physical_line) > pos + 4): | ||
251 | 118 | if (physical_line[-5] != '.'): | ||
252 | 119 | return pos, "N402: one line docstring needs a period" | ||
253 | 120 | |||
254 | 121 | |||
255 | 122 | def cloud_docstring_multiline_end(physical_line): | ||
256 | 123 | """Check multi line docstring end. | ||
257 | 124 | |||
258 | 125 | HACKING guide recommendation for docstring: | ||
259 | 126 | Docstring should end on a new line | ||
260 | 127 | N403 | ||
261 | 128 | """ | ||
262 | 129 | pos = max([physical_line.find(i) for i in DOCSTRING_TRIPLE]) # start | ||
263 | 130 | if (pos != -1 and len(physical_line) == pos): | ||
264 | 131 | print physical_line | ||
265 | 132 | if (physical_line[pos + 3] == ' '): | ||
266 | 133 | return (pos, "N403: multi line docstring end on new line") | ||
267 | 134 | |||
268 | 135 | |||
269 | 136 | current_file = "" | ||
270 | 137 | |||
271 | 138 | |||
272 | 139 | def readlines(filename): | ||
273 | 140 | """Record the current file being tested.""" | ||
274 | 141 | pep8.current_file = filename | ||
275 | 142 | return open(filename).readlines() | ||
276 | 143 | |||
277 | 144 | |||
278 | 145 | def add_cloud(): | ||
279 | 146 | """Monkey patch pep8 for cloud-init guidelines. | ||
280 | 147 | |||
281 | 148 | Look for functions that start with cloud_ | ||
282 | 149 | and add them to pep8 module. | ||
283 | 150 | |||
284 | 151 | Assumes you know how to write pep8.py checks | ||
285 | 152 | """ | ||
286 | 153 | for name, function in globals().items(): | ||
287 | 154 | if not inspect.isfunction(function): | ||
288 | 155 | continue | ||
289 | 156 | if name.startswith("cloud_"): | ||
290 | 157 | exec("pep8.%s = %s" % (name, name)) # pylint: disable=W0122 | ||
291 | 158 | |||
292 | 159 | if __name__ == "__main__": | ||
293 | 160 | # NOVA based 'hacking.py' error codes start with an N | ||
294 | 161 | pep8.ERRORCODE_REGEX = re.compile(r'[EWN]\d{3}') | ||
295 | 162 | add_cloud() | ||
296 | 163 | pep8.current_file = current_file | ||
297 | 164 | pep8.readlines = readlines | ||
298 | 165 | try: | ||
299 | 166 | pep8._main() # pylint: disable=W0212 | ||
300 | 167 | finally: | ||
301 | 168 | if len(_missingImport) > 0: | ||
302 | 169 | print >> sys.stderr, ("%i imports missing in this test environment" | ||
303 | 170 | % len(_missingImport)) | ||
304 | 171 | 0 | ||
305 | === removed file 'tools/run-pep8' | |||
306 | --- tools/run-pep8 2014-01-24 19:47:28 +0000 | |||
307 | +++ tools/run-pep8 1970-01-01 00:00:00 +0000 | |||
308 | @@ -1,38 +0,0 @@ | |||
309 | 1 | #!/bin/bash | ||
310 | 2 | |||
311 | 3 | if [ $# -eq 0 ]; then | ||
312 | 4 | files=( bin/cloud-init $(find * -name "*.py" -type f) ) | ||
313 | 5 | else | ||
314 | 6 | files=( "$@" ); | ||
315 | 7 | fi | ||
316 | 8 | |||
317 | 9 | if [ -f 'hacking.py' ] | ||
318 | 10 | then | ||
319 | 11 | base=`pwd` | ||
320 | 12 | else | ||
321 | 13 | base=`pwd`/tools/ | ||
322 | 14 | fi | ||
323 | 15 | |||
324 | 16 | IGNORE="E501" # Line too long (these are caught by pylint) | ||
325 | 17 | |||
326 | 18 | # King Arthur: Be quiet! ... Be Quiet! I Order You to Be Quiet. | ||
327 | 19 | IGNORE="$IGNORE,E121" # Continuation line indentation is not a multiple of four | ||
328 | 20 | IGNORE="$IGNORE,E123" # Closing bracket does not match indentation of opening bracket's line | ||
329 | 21 | IGNORE="$IGNORE,E124" # Closing bracket missing visual indentation | ||
330 | 22 | IGNORE="$IGNORE,E125" # Continuation line does not distinguish itself from next logical line | ||
331 | 23 | IGNORE="$IGNORE,E126" # Continuation line over-indented for hanging indent | ||
332 | 24 | IGNORE="$IGNORE,E127" # Continuation line over-indented for visual indent | ||
333 | 25 | IGNORE="$IGNORE,E128" # Continuation line under-indented for visual indent | ||
334 | 26 | IGNORE="$IGNORE,E502" # The backslash is redundant between brackets | ||
335 | 27 | |||
336 | 28 | cmd=( | ||
337 | 29 | ${base}/hacking.py | ||
338 | 30 | |||
339 | 31 | --ignore="$IGNORE" | ||
340 | 32 | |||
341 | 33 | "${files[@]}" | ||
342 | 34 | ) | ||
343 | 35 | |||
344 | 36 | echo -e "\nRunning 'cloudinit' pep8:" | ||
345 | 37 | echo "${cmd[@]}" | ||
346 | 38 | "${cmd[@]}" | ||
347 | 39 | 0 | ||
348 | === removed file 'tools/run-pylint' | |||
349 | --- tools/run-pylint 2014-01-24 20:28:06 +0000 | |||
350 | +++ tools/run-pylint 1970-01-01 00:00:00 +0000 | |||
351 | @@ -1,26 +0,0 @@ | |||
352 | 1 | #!/bin/bash | ||
353 | 2 | |||
354 | 3 | if [ $# -eq 0 ]; then | ||
355 | 4 | files=( bin/cloud-init $(find * -name "*.py" -type f) ) | ||
356 | 5 | else | ||
357 | 6 | files=( "$@" ); | ||
358 | 7 | fi | ||
359 | 8 | |||
360 | 9 | RC_FILE="pylintrc" | ||
361 | 10 | if [ ! -f $RC_FILE ]; then | ||
362 | 11 | RC_FILE="../pylintrc" | ||
363 | 12 | fi | ||
364 | 13 | |||
365 | 14 | cmd=( | ||
366 | 15 | pylint | ||
367 | 16 | --rcfile=$RC_FILE | ||
368 | 17 | --disable=R | ||
369 | 18 | --disable=I | ||
370 | 19 | --dummy-variables-rgx="_" | ||
371 | 20 | "${files[@]}" | ||
372 | 21 | ) | ||
373 | 22 | |||
374 | 23 | echo -e "\nRunning pylint:" | ||
375 | 24 | echo "${cmd[@]}" | ||
376 | 25 | "${cmd[@]}" | ||
377 | 26 | |||
378 | 27 | 0 | ||
379 | === added file 'tox.ini' | |||
380 | --- tox.ini 1970-01-01 00:00:00 +0000 | |||
381 | +++ tox.ini 2014-01-26 01:03:26 +0000 | |||
382 | @@ -0,0 +1,49 @@ | |||
383 | 1 | [tox] | ||
384 | 2 | minversion = 1.6 | ||
385 | 3 | skipsdist = True | ||
386 | 4 | envlist = py26,py27,py33 | ||
387 | 5 | |||
388 | 6 | [testenv] | ||
389 | 7 | usedevelop = True | ||
390 | 8 | setenv = VIRTUAL_ENV={envdir} | ||
391 | 9 | LANG=en_US.UTF-8 | ||
392 | 10 | LANGUAGE=en_US:en | ||
393 | 11 | LC_ALL=C | ||
394 | 12 | deps = -r{toxinidir}/requirements.txt | ||
395 | 13 | -r{toxinidir}/test-requirements.txt | ||
396 | 14 | commands = nosetests {posargs} | ||
397 | 15 | install_command = pip install {opts} {packages} | ||
398 | 16 | |||
399 | 17 | [testenv:venv] | ||
400 | 18 | commands = {posargs} | ||
401 | 19 | |||
402 | 20 | [testenv:flake8] | ||
403 | 21 | commands = flake8 {posargs} | ||
404 | 22 | |||
405 | 23 | [flake8] | ||
406 | 24 | # See: http://pylint-messages.wikidot.com/all-codes | ||
407 | 25 | # W0142: *args and **kwargs are fine. | ||
408 | 26 | # W0511: TODOs in code comments are fine. | ||
409 | 27 | # W0702: No exception type(s) specified | ||
410 | 28 | # W0703: Catch "Exception" | ||
411 | 29 | # C0103: Invalid name | ||
412 | 30 | # C0111: Missing docstring | ||
413 | 31 | # F841: local variable ABC is assigned to but never used | ||
414 | 32 | # E121: Continuation line indentation is not a multiple of four | ||
415 | 33 | # E123: Closing bracket does not match indentation of opening bracket's line | ||
416 | 34 | # E124: Closing bracket missing visual indentation | ||
417 | 35 | # E125: Continuation line does not distinguish itself from next logical line | ||
418 | 36 | # E126: Continuation line over-indented for hanging indent | ||
419 | 37 | # E127: Continuation line over-indented for visual indent | ||
420 | 38 | # E128: Continuation line under-indented for visual indent | ||
421 | 39 | # E502: The backslash is redundant between brackets | ||
422 | 40 | # H201: no 'except:' at least use 'except Exception:' | ||
423 | 41 | # H232: Python 3.x incompatible octal X should be written as Y | ||
424 | 42 | # H233: Python 3.x incompatible use of print operator | ||
425 | 43 | # H234: assertEquals is deprecated, use assertEqual | ||
426 | 44 | # H301: one import per line | ||
427 | 45 | # H302: import only modules. | ||
428 | 46 | # H404: multi line docstring should start without a leading new line | ||
429 | 47 | ignore = F841,E121,E123,E124,E125,E126,E127,E128,E502,H234,H201,H301,H404,H302,H232,H233,W0142,W0511,W0702,W0703,C0103,C0111 | ||
430 | 48 | exclude = .venv,.tox,dist,doc,*egg,.bzr,build,tools | ||
431 | 49 | max-line-length = 79 |
Thanks. this is really nice.
need to be able to run 'make test' without tox. Ie, similar to in openstack using only packaged versions. This is important to be able to run tests on build (which won't have access to stuff other than the archive).
you replaced pep8 and pylint with 'flake8'. I think I'm ok with that, but we have lots of '# pylint:' things throughout the code. if we're dropping that we might as well clean them out. I think thats fine as a separate commit though.