diff --git a/kuryr_kubernetes/controller/drivers/utils.py b/kuryr_kubernetes/controller/drivers/utils.py index f5c34aba8..9b4b7d42d 100644 --- a/kuryr_kubernetes/controller/drivers/utils.py +++ b/kuryr_kubernetes/controller/drivers/utils.py @@ -349,7 +349,7 @@ def match_expressions(expressions, labels): label_value = labels.get(str(exp['key']), None) if exp_op == constants.K8S_OPERATOR_IN: if label_value is None or label_value not in exp_values: - return False + return False elif exp_op == constants.K8S_OPERATOR_NOT_IN: if label_value in exp_values: return False @@ -373,7 +373,7 @@ def match_labels(crd_labels, labels): for crd_key, crd_value in crd_labels.items(): label_value = labels.get(crd_key, None) if not label_value or crd_value != label_value: - return False + return False return True diff --git a/kuryr_kubernetes/utils.py b/kuryr_kubernetes/utils.py index d39cfc275..004b899d2 100644 --- a/kuryr_kubernetes/utils.py +++ b/kuryr_kubernetes/utils.py @@ -321,9 +321,8 @@ def get_endpoints_link(service): link_parts = svc_link.split('/') if link_parts[-2] != 'services': - raise exceptions.IntegrityError(_( - "Unsupported service link: %(link)s") % { - 'link': svc_link}) + raise exceptions.IntegrityError( + f"Unsupported service link: {svc_link}") link_parts[-2] = 'endpoints' return "/".join(link_parts) diff --git a/test-requirements.txt b/test-requirements.txt index ffb5526b7..d1b4dc1ef 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # 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.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 ddt>=1.0.1 # MIT