- Feb 09, 2019
-
-
Akihiro Motoki authored
openstack_dashboard/api nova.py and cinder.py are imported by each other. To avoid cyclic imports, some imports are placed inside functions now, but it would be nice if we can move them to a separate module and nova.py/cinder.py can import it. This commit tries to achieve this by moving some stuffs in nova.py into a separate module named _nova.py. The module name starts with an underscore to clarify it is intended to use only in openstack_dashboard.api. Change-Id: If91cf4f30d2ddab471757129c2a74b26b6d38b1e
-
- Jan 19, 2019
-
-
Akihiro Motoki authored
django.http.HttpResponseNotFound is not an exception. Django recommends to return it. @rest_utils.ajax can handle it. Change-Id: I26f82da022a2c2725d62cc136c5da8eafc0ac26f
-
- Jan 16, 2019
-
-
Akihiro Motoki authored
horizon/forms/fields.py: ThemableCheckboxSelectMultiple.__init__ does not have arguments "name" and "value". They were specified before somehow. openstack_dashboard/dashboards/project/instances/forms.py: messages.error() does not have "redirect" argument. We need to redirect explicitly. Change-Id: Ib51abf136fb49e3be65005c5f48715f004379178
-
Akihiro Motoki authored
Change-Id: I8bb2b64cb51f297cac53bf042d4d2bd1fdb0a159
-
Akihiro Motoki authored
pylint complains 'name' argument is redundant in positional and keyword arguments. The existence of 'name' in kwargs is checked before passing to api.keystone.tenant_create, so we can pass 'name' as part of kwargs. Change-Id: Ice09cecb21217b042d44a8c1dda7a4736e2b391b
-
Akihiro Motoki authored
openstack_dashboard/dashboards/project/security_groups/forms.py:393:13: R1714: Consider merging these comparisons with "in" to "rule_menu in ('tcp', 'udp')" (consider-using-in) openstack_dashboard/api/rest/json_encoder.py:61:15: R0124: Redundant comparison - o != o (comparison-with-itself) openstack_dashboard/api/keystone.py:904:15: R1714: Consider merging these comparisons with "in" to 'default in (role.id, role.name)' (consider-using-in) horizon/templatetags/truncate_filter.py:30:7: R1716: Simplify chained comparison between the operands (chained-comparison) Change-Id: I6cf8602f88c4027ff12aaa4ea5a9f2069ae2e2a6
-
Akihiro Motoki authored
openstack_dashboard/dashboards/project/cgroups/workflows.py:313:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks) openstack_auth/plugin/base.py:221:12: R1704: Redefining argument with the local name 'domain_name' (redefined-argument-from-local) horizon/tables/formset.py:59:16: R1704: Redefining argument with the local name 'column' (redefined-argument-from-local) Change-Id: Ifeb192efac83c0b2d5399c51f66c8fb8f8969fc0
-
Akihiro Motoki authored
openstack_dashboard/context_processors.py:94:15: C0122: Comparison should be link['url'] != 'horizon:project:api_access:openrcv2' (misplaced-comparison-constant) openstack_dashboard/settings.py:467:4: C0412: Imports from package horizon are not grouped (ungrouped-imports) openstack_dashboard/enabled/_1370_project_vg_snapshots.py:9:0: C0301: Line too long (86/80) (line-too-long) openstack_dashboard/enabled/_1360_project_volume_groups.py:9:0: C0301: Line too long (85/80) (line-too-long) openstack_dashboard/usage/base.py:62:8: W0106: Expression "[instance_list.extend(u.server_usages) for u in self.usage_list]" is assigned to nothing (expression-not-assigned) openstack_dashboard/dashboards/project/images/utils.py:43:12: W0106: Expression "[public_images.append(image) for image in images]" is assigned to nothing (expression-not-assigned) openstack_dashboard/dashboards/project/images/utils.py:75:12: W0106: Expression "[community_images.append(image) for image in images]" is assigned to nothing (expression-not-assigned) openstack_dashboard/api/glance.py:47:4: C0412: Imports from package glanceclient are not grouped (ungrouped-imports) openstack_dashboard/api/cinder.py:60:4: C0412: Imports from package cinderclient are not grouped (ungrouped-imports) openstack_auth/user.py:358:4: E0211: Method has no argument (no-method-argument) openstack_auth/user.py:362:4: E0211: Method has no argument (no-method-argument) openstack_dashboard/api/keystone.py:75:4: C0412: Imports from package keystoneclient are not grouped (ungrouped-imports) horizon/loaders.py:43:16: W0706: The except handler raises immediately (try-except-raise) horizon/themes.py:174:8: W0706: The except handler raises immediately (try-except-raise) Change-Id: I40cf3ffbc4519657e11180d2e2fe7401387c5556
-
Akihiro Motoki authored
Change-Id: Idfa421774ac23f673007fe7a7381c5199ccda5e0
-
Akihiro Motoki authored
Change-Id: Ie2e5c6482a19553f6c73c50555d65834bb62ca9e
-
Akihiro Motoki authored
Change-Id: I9af66f886c47d3d2be61cba22b6c84460a178b8e
-
Akihiro Motoki authored
Change-Id: I72fa6cacef70e80f95b76e2aa3cefbffad73edb5
-
Akihiro Motoki authored
Change-Id: Iddea27e720dc7184fa3d524a2a465732f18d4dee
-
Akihiro Motoki authored
Change-Id: Ib89c1854ad42b96e4caf281160d568fe98430afe
-
- Jan 15, 2019
-
-
Akihiro Motoki authored
It seems pylint cannot handle distutils imports and shows "import-error" error. I believe it sounds reasonable to ignore this case. Change-Id: Ia08b4fbf8c3270aa37cd88967add8258f6b26377
-
Akihiro Motoki authored
openstack_dashboard/hooks.py:16:0: E0611: No name 'command' in module 'distutils' (no-name-in-module) openstack_dashboard/dashboards/project/networks/ports/sg_base.py:52:12: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return) BaseSecurityGroupsAction._get_initial_security_groups() is now marked as abstract method because this method must be implemented in subclasses. BaseSecurityGroupsAction.handle() is now dropped because there is no difference from the parent class (horizon.workflows.Action). openstack_auth/views.py:211:4: E1206: Not enough arguments for logging format string (logging-too-few-args) openstack_auth/views.py:269:8: E1206: Not enough arguments for logging format string (logging-too-few-args) openstack_auth/plugin/base.py:237:20: E1206: Not enough arguments for logging format string (logging-too-few-args) horizon/base.py:166:24: E1133: Non-iterable value self.policy_rules is used in an iterating context (not-an-iterable) horizon/tabs/base.py:489:40: E1133: Non-iterable value self.table_classes is used in an iterating context (not-an-iterable) Change-Id: I0b045d04af251854b5017c9f698e3b40503a0724
-
- Jan 14, 2019
-
-
Akihiro Motoki authored
Change-Id: Ia81e5c8b77dbfcb48630b1736d581cdff73278ef
-
Akihiro Motoki authored
horizon/forms/__init__.py exposed IPAddressField via __all__, but IPAddressField does not exist in Django code. It addresses pylint undefined-all-variable error. Change-Id: I5e5cc802c0d75e91fad769cc381368b532561476
-
Akihiro Motoki authored
In case of Cell.status property, the code has a good readability, so it sounds reasonable to ignore access-member-before-definition, although access-member-before-definition itself is a useful check. Change-Id: Ic6f2ec42bac41c62265e6b0e744c256007093ce6
-
Akihiro Motoki authored
openstack_dashboard/theme_settings.py:63:8: W1201: Specify string format arguments as logging function parameters (logging-not-lazy) openstack_dashboard/settings.py:412:24: W0122: Use of exec (exec-used) openstack_dashboard/dashboards/identity/domains/workflows.py:476:44: W0640: Cell variable group_id defined in loop (cell-var-from-loop) openstack_dashboard/dashboards/identity/projects/workflows.py:906:49: W0640: Cell variable group_id defined in loop (cell-var-from-loop) openstack_dashboard/dashboards/admin/networks/views.py:42:0: W0404: Reimport 'views' (imported line 28) (reimported) openstack_dashboard/api/swift.py:204:0: W0102: Dangerous default value {} as argument (dangerous-default-value) openstack_dashboard/api/swift.py:214:0: W0102: Dangerous default value {} as argument (dangerous-default-value) openstack_dashboard/api/cinder.py:248:30: W0631: Using possibly undefined loop variable 'cinder_url' (undefined-loop-variable) openstack_auth/backend.py:123:28: W0631: Using possibly undefined loop variable 'plugin' (undefined-loop-variable) openstack_auth/backend.py:129:39: W0631: Using possibly undefined loop variable 'plugin' (undefined-loop-variable) openstack_auth/backend.py:131:39: W0631: Using possibly undefined loop variable 'plugin' (undefined-loop-variable) openstack_auth/views.py:39:0: W0611: Unused Login imported from openstack_auth.forms (unused-import) horizon/exceptions.py:348:8: W0125: Using a conditional statement with a constant value (using-constant-test) horizon/tables/base.py:353:12: W0715: Exception arguments suggest string formatting might be intended (raising-format-tuple) Change-Id: Icf4f22abda77c9dbf98c780de876b7836c31d669
-
- Jan 12, 2019
-
-
Akihiro Motoki authored
Change-Id: I81c694c17106c179a53326a12e78cfa899872970
-
Akihiro Motoki authored
tests.py files are excluded from targets checked by pylint because it takes longer and longer time to check them somehow. pylint 2.2.x is supported only in Python 3 and we already switched our pep8 basepython to python3, so pylint and astroid are installed only for python3. This seems the easiest way to ensure py27 env works. literal-comparison error in openstack_dashboard/api/nova.py is also fixed in this commit as it is simple enough. Change-Id: Ic8868a44b296dba457be721716ca6f9d37ad9369
-
- Aug 31, 2011
-
-
Joe Heck authored
-