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:
|
# To clean up:
|
||||||
abstract-method,
|
abstract-method,
|
||||||
arguments-differ,
|
arguments-differ,
|
||||||
consider-using-in,
|
|
||||||
consider-using-max-builtin,
|
consider-using-max-builtin,
|
||||||
consider-using-with,
|
consider-using-with,
|
||||||
fixme,
|
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
|
# These protos are valid aliases for our library but not for the
|
||||||
# official spec
|
# official spec
|
||||||
if proto == "http" or proto == "https":
|
if proto in ("http", "https"):
|
||||||
tls = proto == "https"
|
tls = proto == "https"
|
||||||
proto = "tcp"
|
proto = "tcp"
|
||||||
elif proto == "http+unix":
|
elif proto == "http+unix":
|
||||||
|
|||||||
@ -204,7 +204,7 @@ def parse_line(line, logrus_mode=False):
|
|||||||
mode = parsers[mode](parser.cur())
|
mode = parsers[mode](parser.cur())
|
||||||
if mode == _Mode.KEY and logrus_mode:
|
if mode == _Mode.KEY and logrus_mode:
|
||||||
raise InvalidLogFmt('Key must always be followed by "=" in 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)
|
handle_kv(has_no_value=True)
|
||||||
elif mode == _Mode.IDENT_VALUE:
|
elif mode == _Mode.IDENT_VALUE:
|
||||||
handle_kv()
|
handle_kv()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user