]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephadm: re-format black net_utils.py 53618/head
authorAdam King <adking@redhat.com>
Sat, 23 Sep 2023 17:04:39 +0000 (13:04 -0400)
committerAdam King <adking@redhat.com>
Mon, 25 Sep 2023 19:00:24 +0000 (15:00 -0400)
commit9b084a8f1337869e153b1f54b8e9b9ef6ea9f5af
treeb66d499b7802d85cfa331c15d2dba3f155829c81
parent4a826da317a79d045374f4452a692e87bec4596c
cephadm: re-format black net_utils.py

There was a conflict here between what black
and flake8 were okay with. After running
format-black flake8 would report

cephadmlib/net_utils.py:211:29: E203 whitespace before ':'
cephadmlib/net_utils.py:259:25: E203 whitespace before ':'
cephadmlib/net_utils.py:272:27: E203 whitespace before ':'

but removing the whitespace before the ":" would
cause black to complain. For parse_mon_ip and
parse_mon_addrv, it was doing array slicing with
a start of "0" so I believe we can just remove the
start point without affecting anything (since "0" is
just the beginning of the string anyway). For
get_ipv6_address it had to actually be altered in
a way that had the potential to be done incorrectly,
so I added a unit test for it in a previous commit
in order to make sure we maintain the behavior.

Signed-off-by: Adam King <adking@redhat.com>
src/cephadm/cephadmlib/net_utils.py