Browse Source

fix pep8 error and add zuul check of pep8

Change-Id: Ia4943ec1cf06768a9b5281d9aeaab3cbe7635d30
changes/91/768691/10
jiasirui 11 months ago
parent
commit
36669a4fff
  1. 8
      .zuul.yaml
  2. 2
      requirements.txt
  3. 1
      test-requirements.txt
  4. 6
      tox.ini
  5. 8
      venusclient/shell.py
  6. 0
      venusclient/tests/__init__.py
  7. 3
      venusclient/v1/client.py
  8. 5
      venusclient/v1/config.py
  9. 9
      venusclient/v1/config_shell.py

8
.zuul.yaml

@ -1,3 +1,7 @@
- project:
templates:
- noop-jobs
check:
jobs:
- openstack-tox-pep8
gate:
jobs:
- openstack-tox-pep8

2
requirements.txt

@ -7,7 +7,7 @@ six>=1.10.0 # MIT
keystoneauth1>=3.3.0 # Apache-2.0
stevedore>=1.20.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0
oslo.i18n>=3.15.3 # Apache-2.0
oslo.i18n>=1.5.0 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0

1
test-requirements.txt

@ -3,7 +3,6 @@
# process, which may cause wedges in the gate later.
hacking>=3.0,<3.1.0 # Apache-2.0
coverage>=4.0,!=4.4 # Apache-2.0
python-subunit>=0.0.18 # Apache-2.0/BSD
sphinx>=2.0.0,!=2.1.0 # BSD

6
tox.ini

@ -1,8 +1,8 @@
[tox]
minversion = 3.1.1
envlist = py37,pep8
minversion = 3.2.1
envlist = py3,pep8
skipsdist = True
ignore_basepython_conflict = True
ignore_basepython_conflict=true
[testenv]
basepython = python3

8
venusclient/shell.py

@ -27,13 +27,11 @@ from __future__ import print_function
import argparse
import logging
import os
import sys
import six
from oslo_utils import encodeutils
from oslo_utils import importutils
from oslo_utils import strutils
import six
import sys
from venusclient.common import cliutils
from venusclient import exceptions as exc
from venusclient.i18n import _
@ -496,7 +494,7 @@ class OpenStackVenusShell(object):
args.os_project_id = (args.os_project_id or args.os_tenant_id)
args.os_project_name = (args.os_project_name or args.os_tenant_name)
#self._ensure_auth_info(args)
# self._ensure_auth_info(args)
try:
client = {

0
venusclient/tests/__init__.py

3
venusclient/v1/client.py

@ -14,6 +14,7 @@
# limitations under the License.
import os_client_config
from keystoneauth1 import session as ksa_session
from oslo_utils import importutils
from venusclient.common import httpclient
@ -48,7 +49,7 @@ def _load_service_type(session,
try:
# Trigger an auth error so that we can throw the exception
# we always have
aaa = session.get_endpoint(
session.get_endpoint(
service_type=service_type,
service_name=service_name,
interface=interface,

5
venusclient/v1/config.py

@ -31,6 +31,5 @@ class ConfigManager(basemodels.BaseModelManager):
url = '/v1/custom_config'
try:
resp, body = self.api.json_request('GET', url)
except:
print("")
except Exception as e:
raise RuntimeError(str(e))

9
venusclient/v1/config_shell.py

@ -12,13 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from venusclient.common import cliutils as utils
from venusclient.i18n import _
def do_get_log_storage_days(cs,args):
def do_get_log_storage_days(cs, args):
"""get the elasticsearch days of svae the logs."""
endpoint = cs.config.get_days()
print(endpoint)

Loading…
Cancel
Save