mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-03-15 19:58:28 +00:00
Address consider-using-in.
This commit is contained in:
parent
6d97fca880
commit
da788d3669
@ -381,7 +381,6 @@ disable=raw-checker-failed,
|
||||
# To clean up:
|
||||
abstract-method,
|
||||
arguments-differ,
|
||||
consider-using-in,
|
||||
consider-using-max-builtin,
|
||||
consider-using-with,
|
||||
fixme,
|
||||
|
||||
@ -250,7 +250,7 @@ def parse_host(addr, is_win32=False, tls=False):
|
||||
|
||||
# These protos are valid aliases for our library but not for the
|
||||
# official spec
|
||||
if proto == "http" or proto == "https":
|
||||
if proto in ("http", "https"):
|
||||
tls = proto == "https"
|
||||
proto = "tcp"
|
||||
elif proto == "http+unix":
|
||||
|
||||
@ -204,7 +204,7 @@ def parse_line(line, logrus_mode=False):
|
||||
mode = parsers[mode](parser.cur())
|
||||
if mode == _Mode.KEY and logrus_mode:
|
||||
raise InvalidLogFmt('Key must always be followed by "=" in logrus mode')
|
||||
if mode == _Mode.KEY or mode == _Mode.EQUAL:
|
||||
if mode in (_Mode.KEY, _Mode.EQUAL):
|
||||
handle_kv(has_no_value=True)
|
||||
elif mode == _Mode.IDENT_VALUE:
|
||||
handle_kv()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user