Browse Source

Add linter jobs for releases file script

This review adds a pep8 jobs to be triggered
with changes to the releases script files.
pylint was considered but removed from this
initial review.

Change-Id: Ib8809c94d99ccb1ecafa94b3791f613c35dbd9ef
Ronelle Landy 11 months ago
parent
commit
dbca28c411

+ 1
- 0
scripts/emit_releases_file/emit_releases_file.py View File

@@ -8,6 +8,7 @@ import yaml
8 8
 
9 9
 # Define releases
10 10
 RELEASES = ['newton', 'ocata', 'pike', 'queens', 'master']
11
+# Define long term releases
11 12
 LONG_TERM_SUPPORT_RELEASES = ['queens']
12 13
 
13 14
 

+ 1
- 0
scripts/emit_releases_file/test_get_dlrn_hash.py View File

@@ -3,6 +3,7 @@ from emit_releases_file import get_dlrn_hash
3 3
 import mock
4 4
 import pytest
5 5
 
6
+
6 7
 @mock.patch('requests.get')
7 8
 def test_get_dlrn_hash(mock_get):
8 9
     mock_response = mock.Mock()

+ 2
- 1
tox.ini View File

@@ -15,8 +15,9 @@ deps = pyflakes
15 15
 commands = pyflakes setup.py scripts
16 16
 
17 17
 [testenv:pep8]
18
+changedir = scripts/emit_releases_file
18 19
 whitelist_externals = bash
19
-commands = flake8
20
+commands = flake8 --max-line-length 80
20 21
 
21 22
 [testenv:cireport]
22 23
 passenv =

+ 6
- 0
zuul.d/layout.yaml View File

@@ -18,6 +18,9 @@
18 18
         - openstack-tox-py35:
19 19
             files:
20 20
               - ^scripts/emit_releases_file/.*$
21
+        - openstack-tox-pep8:
22
+            files:
23
+              - ^scripts/emit_releases_file/.*$
21 24
     gate:
22 25
       queue: tripleo
23 26
       jobs:
@@ -27,3 +30,6 @@
27 30
         - openstack-tox-py35:
28 31
             files:
29 32
               - ^scripts/emit_releases_file/.*$
33
+        - openstack-tox-pep8:
34
+            files:
35
+              - ^scripts/emit_releases_file/.*$

Loading…
Cancel
Save