Address consider-using-in.

This commit is contained in:
Felix Fontein 2025-10-11 14:32:57 +02:00
parent 6d97fca880
commit da788d3669
3 changed files with 2 additions and 3 deletions

View File

@ -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,

View File

@ -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":

View File

@ -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()