Browse Source

Update hacking version

Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I8bb814f8db8c87ba6b757be482d79d40548a137d
changes/38/627638/4
ZhijunWei 3 years ago
parent
commit
671cbd6024
5 changed files with 11 additions and 12 deletions
  1. +1
    -1
      HACKING.rst
  2. +5
    -7
      oslo_service/periodic_task.py
  3. +2
    -2
      oslo_service/service.py
  4. +1
    -1
      test-requirements.txt
  5. +2
    -1
      tox.ini

+ 1
- 1
HACKING.rst View File

@ -1,4 +1,4 @@
oslo.service Style Commandments
======================================================
===============================
Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/

+ 5
- 7
oslo_service/periodic_task.py View File

@ -14,20 +14,18 @@
import copy
import logging
import random
import six
import time
from oslo_service._i18n import _
from oslo_service import _options
from oslo_utils import reflection
if hasattr(time, 'monotonic'):
now = time.monotonic
else:
from monotonic import monotonic as now # noqa
from oslo_utils import reflection
import six
from oslo_service._i18n import _
from oslo_service import _options
LOG = logging.getLogger(__name__)
DEFAULT_INTERVAL = 60.0


+ 2
- 2
oslo_service/service.py View File

@ -139,8 +139,8 @@ class SignalHandler(object):
self._ignore_signals = ('SIG_DFL', 'SIG_IGN')
self._signals_by_name = dict((name, getattr(signal, name))
for name in dir(signal)
if name.startswith("SIG")
and name not in self._ignore_signals)
if name.startswith("SIG") and
name not in self._ignore_signals)
self.signals_to_name = dict(
(sigval, name)
for (name, sigval) in self._signals_by_name.items())


+ 1
- 1
test-requirements.txt View File

@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later.
fixtures>=3.0.0 # Apache-2.0/BSD
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=1.1.0,<1.2.0 # Apache-2.0
mock>=2.0.0 # BSD
oslotest>=3.2.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0


+ 2
- 1
tox.ini View File

@ -38,9 +38,10 @@ commands = python setup.py test --coverage --coverage-package-name=oslo_service
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
# E731 skipped as assign a lambda expression
show-source = True
ignore = E123,E125
ignore = E123,E125,E731
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[hacking]


Loading…
Cancel
Save