From 61dc17d8cbc131b014ba6501fa4efc0bc7ebebe9 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 21 Apr 2021 08:59:22 -0400 Subject: [PATCH] tools: Cleanup frr-reload.py by running black on it Signed-off-by: Donald Sharp --- tools/frr-reload.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 27ce0be3b7..a617c0a9c5 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -188,17 +188,17 @@ class Vtysh(object): class Context(object): """ - A Context object represents a section of frr configuration such as: -! -interface swp3 - description swp3 -> r8's swp1 - ipv6 nd suppress-ra - link-detect -! + A Context object represents a section of frr configuration such as: + ! + interface swp3 + description swp3 -> r8's swp1 + ipv6 nd suppress-ra + link-detect + ! -or a single line context object such as this: + or a single line context object such as this: -ip forwarding + ip forwarding """ @@ -1119,12 +1119,15 @@ def ignore_delete_re_add_lines(lines_to_add, lines_to_del): # in-place, to avoid requesting spurious label chunks which might fail if line and "segment-routing global-block" in line: for (add_key, add_line) in lines_to_add: - if ctx_keys[0] == add_key[0] and add_line and "segment-routing global-block" in add_line: + if ( + ctx_keys[0] == add_key[0] + and add_line + and "segment-routing global-block" in add_line + ): lines_to_del_to_del.append((ctx_keys, line)) break continue - if ctx_keys[0].startswith("router bgp") and line: if line.startswith("neighbor "): -- 2.39.5