Browse Source

Fix pep8 E402

Change-Id: Ie8eda174a6da50a222e4070a18a421eff28b6119
zhurong 3 months ago
parent
commit
20af772ee7
20 changed files with 77 additions and 99 deletions
  1. 2
    1
      api-ref/source/conf.py
  2. 8
    10
      murano/cmd/api.py
  3. 8
    11
      murano/cmd/cfapi.py
  4. 8
    10
      murano/cmd/engine.py
  5. 3
    4
      murano/db/cfapi_migration/alembic_migrations/versions/001_initial_version.py
  6. 3
    5
      murano/db/migration/alembic_migrations/versions/001_initial_version.py
  7. 2
    4
      murano/db/migration/alembic_migrations/versions/002_add_package_supplier_info.py
  8. 4
    5
      murano/db/migration/alembic_migrations/versions/003_add_action_entry.py
  9. 4
    5
      murano/db/migration/alembic_migrations/versions/004_change_package_desc_type.py
  10. 2
    4
      murano/db/migration/alembic_migrations/versions/005_environment-template.py
  11. 2
    4
      murano/db/migration/alembic_migrations/versions/006_add_task_result.py
  12. 3
    4
      murano/db/migration/alembic_migrations/versions/009_add_cloudfoundry_connections.py
  13. 3
    4
      murano/db/migration/alembic_migrations/versions/010_remove_unused_networking_column.py
  14. 3
    4
      murano/db/migration/alembic_migrations/versions/011_add_is_public_to_template.py
  15. 3
    4
      murano/db/migration/alembic_migrations/versions/012_support_domain_users.py
  16. 4
    4
      murano/db/migration/alembic_migrations/versions/013_increase_description_text_size.py
  17. 3
    3
      murano/db/migration/alembic_migrations/versions/014_increase_status_time_resolution.py
  18. 3
    4
      murano/db/migration/alembic_migrations/versions/015_adding_text_description.py
  19. 4
    4
      murano/db/migration/alembic_migrations/versions/016_increase_task_description_text_size.py
  20. 5
    5
      murano/opts.py

+ 2
- 1
api-ref/source/conf.py View File

@@ -27,6 +27,8 @@
27 27
 import os
28 28
 import sys
29 29
 
30
+from murano.version import version_info
31
+
30 32
 extensions = [
31 33
     'os_api_ref',
32 34
     'openstackdocstheme'
@@ -74,7 +76,6 @@ copyright = u'2016-present, OpenStack Foundation'
74 76
 # |version| and |release|, also used in various other places throughout the
75 77
 # built documents.
76 78
 #
77
-from murano.version import version_info
78 79
 # The full version, including alpha/beta/rc tags.
79 80
 release = version_info.release_string()
80 81
 # The short X.Y version.

+ 8
- 10
murano/cmd/api.py View File

@@ -16,19 +16,10 @@
16 16
 
17 17
 
18 18
 import os
19
+import sys
19 20
 
20 21
 import eventlet
21 22
 
22
-if os.name == 'nt':
23
-    # eventlet monkey patching causes subprocess.Popen to fail on Windows
24
-    # when using pipes due to missing non blocking I/O support
25
-    eventlet.monkey_patch(os=False)
26
-else:
27
-    eventlet.monkey_patch()
28
-
29
-
30
-import sys
31
-
32 23
 from oslo_concurrency import processutils
33 24
 from oslo_config import cfg
34 25
 from oslo_log import log as logging
@@ -45,6 +36,13 @@ from murano.common import wsgi
45 36
 CONF = cfg.CONF
46 37
 
47 38
 
39
+if os.name == 'nt':
40
+    # eventlet monkey patching causes subprocess.Popen to fail on Windows
41
+    # when using pipes due to missing non blocking I/O support
42
+    eventlet.monkey_patch(os=False)
43
+else:
44
+    eventlet.monkey_patch()
45
+
48 46
 # If ../murano/__init__.py exists, add ../ to Python search path, so that
49 47
 # it will override what happens to be installed in /usr/(local/)lib/python...
50 48
 root = os.path.join(os.path.abspath(__file__), os.pardir, os.pardir, os.pardir)

+ 8
- 11
murano/cmd/cfapi.py View File

@@ -14,21 +14,11 @@
14 14
 #    License for the specific language governing permissions and limitations
15 15
 #    under the License.
16 16
 
17
-
18 17
 import os
18
+import sys
19 19
 
20 20
 import eventlet
21 21
 
22
-if os.name == 'nt':
23
-    # eventlet monkey patching causes subprocess.Popen to fail on Windows
24
-    # when using pipes due to missing non blocking I/O support
25
-    eventlet.monkey_patch(os=False)
26
-else:
27
-    eventlet.monkey_patch()
28
-
29
-
30
-import sys
31
-
32 22
 from oslo_config import cfg
33 23
 from oslo_log import log as logging
34 24
 from oslo_service import service
@@ -42,6 +32,13 @@ from murano.common import wsgi
42 32
 CONF = cfg.CONF
43 33
 
44 34
 
35
+if os.name == 'nt':
36
+    # eventlet monkey patching causes subprocess.Popen to fail on Windows
37
+    # when using pipes due to missing non blocking I/O support
38
+    eventlet.monkey_patch(os=False)
39
+else:
40
+    eventlet.monkey_patch()
41
+
45 42
 # If ../murano/__init__.py exists, add ../ to Python search path, so that
46 43
 # it will override what happens to be installed in /usr/(local/)lib/python...
47 44
 root = os.path.join(os.path.abspath(__file__), os.pardir, os.pardir, os.pardir)

+ 8
- 10
murano/cmd/engine.py View File

@@ -15,19 +15,10 @@
15 15
 #    under the License.
16 16
 
17 17
 import os
18
+import sys
18 19
 
19 20
 import eventlet
20 21
 
21
-if os.name == 'nt':
22
-    # eventlet monkey patching causes subprocess.Popen to fail on Windows
23
-    # when using pipes due to missing non blocking I/O support
24
-    eventlet.monkey_patch(os=False)
25
-else:
26
-    eventlet.monkey_patch()
27
-
28
-
29
-import sys
30
-
31 22
 from oslo_concurrency import processutils
32 23
 from oslo_log import log as logging
33 24
 from oslo_service import service
@@ -38,6 +29,13 @@ from murano.common import engine
38 29
 CONF = config.CONF
39 30
 
40 31
 
32
+if os.name == 'nt':
33
+    # eventlet monkey patching causes subprocess.Popen to fail on Windows
34
+    # when using pipes due to missing non blocking I/O support
35
+    eventlet.monkey_patch(os=False)
36
+else:
37
+    eventlet.monkey_patch()
38
+
41 39
 # If ../murano/__init__.py exists, add ../ to Python search path, so that
42 40
 # it will override what happens to be installed in /usr/(local/)lib/python...
43 41
 root = os.path.join(os.path.abspath(__file__), os.pardir, os.pardir, os.pardir)

+ 3
- 4
murano/db/cfapi_migration/alembic_migrations/versions/001_initial_version.py View File

@@ -18,13 +18,12 @@ Create Date: 2016-03-30 16:34:33.698760
18 18
 
19 19
 """
20 20
 
21
-# revision identifiers, used by Alembic.
22
-revision = '001'
23
-down_revision = None
24
-
25 21
 from alembic import op
26 22
 import sqlalchemy as sa
27 23
 
24
+# revision identifiers, used by Alembic.
25
+revision = '001'
26
+down_revision = None
28 27
 
29 28
 MYSQL_ENGINE = 'InnoDB'
30 29
 MYSQL_CHARSET = 'utf8'

+ 3
- 5
murano/db/migration/alembic_migrations/versions/001_initial_version.py View File

@@ -18,11 +18,6 @@ Revises: None
18 18
 Create Date: 2014-05-29 16:32:33.698760
19 19
 
20 20
 """
21
-
22
-# revision identifiers, used by Alembic.
23
-revision = '001'
24
-down_revision = None
25
-
26 21
 import uuid
27 22
 
28 23
 from alembic import op
@@ -33,6 +28,9 @@ from sqlalchemy.sql.expression import table as sa_table
33 28
 from murano.common import consts
34 29
 from murano.db.sqla import types as st
35 30
 
31
+# revision identifiers, used by Alembic.
32
+revision = '001'
33
+down_revision = None
36 34
 
37 35
 MYSQL_ENGINE = 'InnoDB'
38 36
 MYSQL_CHARSET = 'utf8'

+ 2
- 4
murano/db/migration/alembic_migrations/versions/002_add_package_supplier_info.py View File

@@ -18,15 +18,13 @@ Revises: None
18 18
 Create Date: 2014-06-23 16:34:33.698760
19 19
 
20 20
 """
21
+from alembic import op
22
+import sqlalchemy as sa
21 23
 
22 24
 # revision identifiers, used by Alembic.
23 25
 revision = '002'
24 26
 down_revision = '001'
25 27
 
26
-from alembic import op
27
-import sqlalchemy as sa
28
-
29
-
30 28
 MYSQL_ENGINE = 'InnoDB'
31 29
 MYSQL_CHARSET = 'utf8'
32 30
 

+ 4
- 5
murano/db/migration/alembic_migrations/versions/003_add_action_entry.py View File

@@ -19,16 +19,15 @@ Revises: table deployment
19 19
 Create Date: 2014-07-30 16:11:33.244
20 20
 
21 21
 """
22
-
23
-# revision identifiers, used by Alembic.
24
-revision = '003'
25
-down_revision = '002'
26
-
27 22
 from alembic import op
28 23
 import sqlalchemy as sa
29 24
 
30 25
 import murano.db.migration.helpers as helpers
31 26
 
27
+# revision identifiers, used by Alembic.
28
+revision = '003'
29
+down_revision = '002'
30
+
32 31
 MYSQL_ENGINE = 'InnoDB'
33 32
 MYSQL_CHARSET = 'utf8'
34 33
 

+ 4
- 5
murano/db/migration/alembic_migrations/versions/004_change_package_desc_type.py View File

@@ -18,17 +18,16 @@ Revision ID: 004
18 18
 Revises: table package
19 19
 
20 20
 """
21
-
22
-# revision identifiers, used by Alembic.
23
-revision = '004'
24
-down_revision = '003'
25
-
26 21
 from alembic import op
27 22
 import sqlalchemy as sa
28 23
 
29 24
 import murano.db.migration.helpers as helpers
30 25
 from murano.db.sqla import types as st
31 26
 
27
+# revision identifiers, used by Alembic.
28
+revision = '004'
29
+down_revision = '003'
30
+
32 31
 MYSQL_ENGINE = 'InnoDB'
33 32
 MYSQL_CHARSET = 'utf8'
34 33
 

+ 2
- 4
murano/db/migration/alembic_migrations/versions/005_environment-template.py View File

@@ -19,15 +19,13 @@ Revision ID: 005
19 19
 Revises: table template
20 20
 
21 21
 """
22
+from alembic import op
23
+import sqlalchemy as sa
22 24
 
23 25
 # revision identifiers, used by Alembic.
24 26
 revision = '005'
25 27
 down_revision = '004'
26 28
 
27
-from alembic import op
28
-import sqlalchemy as sa
29
-
30
-
31 29
 MYSQL_ENGINE = 'InnoDB'
32 30
 MYSQL_CHARSET = 'utf8'
33 31
 

+ 2
- 4
murano/db/migration/alembic_migrations/versions/006_add_task_result.py View File

@@ -18,15 +18,13 @@ Revises: None
18 18
 Create Date: 2015-02-15 12:14:12
19 19
 
20 20
 """
21
+from alembic import op
22
+import sqlalchemy as sa
21 23
 
22 24
 # revision identifiers, used by Alembic.
23 25
 revision = '006'
24 26
 down_revision = '005'
25 27
 
26
-from alembic import op
27
-import sqlalchemy as sa
28
-
29
-
30 28
 MYSQL_ENGINE = 'InnoDB'
31 29
 MYSQL_CHARSET = 'utf8'
32 30
 

+ 3
- 4
murano/db/migration/alembic_migrations/versions/009_add_cloudfoundry_connections.py View File

@@ -18,13 +18,12 @@ Create Date: 2015-08-17 16:34:33.698760
18 18
 
19 19
 """
20 20
 
21
-# revision identifiers, used by Alembic.
22
-revision = '009'
23
-down_revision = '008'
24
-
25 21
 from alembic import op
26 22
 import sqlalchemy as sa
27 23
 
24
+# revision identifiers, used by Alembic.
25
+revision = '009'
26
+down_revision = '008'
28 27
 
29 28
 MYSQL_ENGINE = 'InnoDB'
30 29
 MYSQL_CHARSET = 'utf8'

+ 3
- 4
murano/db/migration/alembic_migrations/versions/010_remove_unused_networking_column.py View File

@@ -18,13 +18,12 @@ Create Date: 2015-09-08 00:00:00.698760
18 18
 
19 19
 """
20 20
 
21
-# revision identifiers, used by Alembic.
22
-revision = '010'
23
-down_revision = '009'
24
-
25 21
 from alembic import op
26 22
 import sqlalchemy as sa
27 23
 
24
+# revision identifiers, used by Alembic.
25
+revision = '010'
26
+down_revision = '009'
28 27
 
29 28
 MYSQL_ENGINE = 'InnoDB'
30 29
 MYSQL_CHARSET = 'utf8'

+ 3
- 4
murano/db/migration/alembic_migrations/versions/011_add_is_public_to_template.py View File

@@ -20,13 +20,12 @@ Revises: table template
20 20
 
21 21
 """
22 22
 
23
-# revision identifiers, used by Alembic.
24
-revision = '011'
25
-down_revision = '010'
26
-
27 23
 from alembic import op
28 24
 import sqlalchemy as sa
29 25
 
26
+# revision identifiers, used by Alembic.
27
+revision = '011'
28
+down_revision = '010'
30 29
 
31 30
 MYSQL_ENGINE = 'InnoDB'
32 31
 MYSQL_CHARSET = 'utf8'

+ 3
- 4
murano/db/migration/alembic_migrations/versions/012_support_domain_users.py View File

@@ -20,13 +20,12 @@ Revises: table session, table package
20 20
 
21 21
 """
22 22
 
23
-# revision identifiers, used by Alembic.
24
-revision = '012'
25
-down_revision = '011'
26
-
27 23
 from alembic import op
28 24
 import sqlalchemy as sa
29 25
 
26
+# revision identifiers, used by Alembic.
27
+revision = '012'
28
+down_revision = '011'
30 29
 
31 30
 MYSQL_ENGINE = 'InnoDB'
32 31
 MYSQL_CHARSET = 'utf8'

+ 4
- 4
murano/db/migration/alembic_migrations/versions/013_increase_description_text_size.py View File

@@ -21,14 +21,14 @@ Create Date: 2016-04-12 15:46:12.251155
21 21
 
22 22
 """
23 23
 
24
-# revision identifiers, used by Alembic.
25
-revision = '013'
26
-down_revision = '012'
27
-
28 24
 from alembic import op
29 25
 import sqlalchemy as sa
30 26
 import sqlalchemy.dialects.mysql as sa_mysql
31 27
 
28
+# revision identifiers, used by Alembic.
29
+revision = '013'
30
+down_revision = '012'
31
+
32 32
 MYSQL_ENGINE = 'InnoDB'
33 33
 MYSQL_CHARSET = 'utf8'
34 34
 

+ 3
- 3
murano/db/migration/alembic_migrations/versions/014_increase_status_time_resolution.py View File

@@ -20,13 +20,13 @@ Create Date: 2016-04-28
20 20
 
21 21
 """
22 22
 
23
+from alembic import op
24
+import sqlalchemy.dialects.mysql as sa_mysql
25
+
23 26
 # revision identifiers, used by Alembic.
24 27
 revision = '014'
25 28
 down_revision = '013'
26 29
 
27
-from alembic import op
28
-import sqlalchemy.dialects.mysql as sa_mysql
29
-
30 30
 MYSQL_ENGINE = 'InnoDB'
31 31
 MYSQL_CHARSET = 'utf8'
32 32
 

+ 3
- 4
murano/db/migration/alembic_migrations/versions/015_adding_text_description.py View File

@@ -20,13 +20,12 @@ Create Date: 2016-06-17
20 20
 
21 21
 """
22 22
 
23
-# revision identifiers, used by Alembic.
24
-revision = '015'
25
-down_revision = '014'
26
-
27 23
 from alembic import op
28 24
 import sqlalchemy as sa
29 25
 
26
+# revision identifiers, used by Alembic.
27
+revision = '015'
28
+down_revision = '014'
30 29
 
31 30
 MYSQL_ENGINE = 'InnoDB'
32 31
 MYSQL_CHARSET = 'utf8'

+ 4
- 4
murano/db/migration/alembic_migrations/versions/016_increase_task_description_text_size.py View File

@@ -21,14 +21,14 @@ Create Date: 2016-08-30 10:45:00
21 21
 
22 22
 """
23 23
 
24
-# revision identifiers, used by Alembic.
25
-revision = '016'
26
-down_revision = '015'
27
-
28 24
 from alembic import op
29 25
 import sqlalchemy as sa
30 26
 import sqlalchemy.dialects.mysql as sa_mysql
31 27
 
28
+# revision identifiers, used by Alembic.
29
+revision = '016'
30
+down_revision = '015'
31
+
32 32
 MYSQL_ENGINE = 'InnoDB'
33 33
 MYSQL_CHARSET = 'utf8'
34 34
 

+ 5
- 5
murano/opts.py View File

@@ -12,11 +12,6 @@
12 12
 #    License for the specific language governing permissions and limitations
13 13
 #    under the License.
14 14
 
15
-__all__ = [
16
-    'list_opts',
17
-    'list_cfapi_opts',
18
-]
19
-
20 15
 import copy
21 16
 import itertools
22 17
 from keystoneauth1 import loading as ks_loading
@@ -27,6 +22,11 @@ import murano.common.cf_config
27 22
 import murano.common.config
28 23
 import murano.common.wsgi
29 24
 
25
+__all__ = [
26
+    'list_opts',
27
+    'list_cfapi_opts',
28
+]
29
+
30 30
 
31 31
 def build_list(opt_list):
32 32
     return list(itertools.chain(*opt_list))

Loading…
Cancel
Save