Update hacking for Python3

The repo is Python 3 now, so update hacking to version 2.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Change-Id: Ifa4b61c66561c114f6e35355de51f0e2d525b5d5
This commit is contained in:
Andreas Jaeger 2020-03-30 08:20:53 +02:00
parent 2b2cc45bce
commit 7d8894441a
5 changed files with 6 additions and 3 deletions

View File

@ -119,7 +119,7 @@ class MuranoAgent(service.Service):
msg.id = result.get('SourceID')
routing_key = CONF.rabbitmq.result_routing_key
if ('ReplyTo' in result) and CONF.enable_dynamic_result_queue:
routing_key = result.pop('ReplyTo')
routing_key = result.pop('ReplyTo')
mq.send(message=msg,
key=routing_key,
exchange=CONF.rabbitmq.result_exchange)

View File

@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# flake8: noqa: E402
import os
import sys

View File

@ -26,6 +26,7 @@ class ExecutorsRepo(object):
return None
return self._executors[type](name)
Executors = ExecutorsRepo()

View File

@ -1,7 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=2.0,<2.1.0 # Apache-2.0
unittest2>=1.1.0 # BSD
coverage>=4.5.1 # Apache-2.0
mock>=2.0.0 # BSD

View File

@ -57,7 +57,7 @@ deps =
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
ignore = F401
ignore = F401,W503,W504
show-source = true
exclude=.git,.tox,dist,doc,*lib/python*,*egg