Skip to content

Commit

Permalink
[pylint] Enable consider-using-set-comprehension
Browse files Browse the repository at this point in the history
Signed-off-by: Ponnuvel Palaniyappan <[email protected]>
  • Loading branch information
pponnuvel authored and TurboTurtle committed Aug 2, 2024
1 parent e88916f commit b5403ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ disable=
E1101, # no-member
E1135, # unsupported-membership-test
R1703, # simplifiable-if-statement
R1718, # consider-using-set-comprehension
R1721, # unnecessary-comprehension
W0108, # unnecessary-lambda
W0222, # signature-differs
Expand Down
4 changes: 2 additions & 2 deletions sos/collector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ def __init__(self, parser, parsed_args, cmdline_args):
# get the local hostname and addresses to filter from results later
self.hostname = socket.gethostname()
try:
self.ip_addrs = list(set([
self.ip_addrs = list({
i[4][0] for i in socket.getaddrinfo(socket.gethostname(), None)
]))
})
except Exception:
# this is almost always a DNS issue with reverse resolution
# set a safe fallback and log the issue
Expand Down

0 comments on commit b5403ae

Please sign in to comment.