Merge "Update hacking version"

This commit is contained in:
Zuul 2019-02-19 19:21:07 +00:00 committed by Gerrit Code Review
commit 4ac1da03fb
5 changed files with 11 additions and 12 deletions

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
fixtures>=3.0.0 # Apache-2.0/BSD 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 mock>=2.0.0 # BSD
oslotest>=3.2.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0 requests>=2.14.2 # Apache-2.0

View File

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