unify option extraction for legacy hook marks
This commit is contained in:
parent
e3294398d6
commit
7e8a4849d8
|
@ -358,9 +358,9 @@ def _get_legacy_hook_marks(
|
||||||
opt_attr = getattr(method, opt_name, AttributeError)
|
opt_attr = getattr(method, opt_name, AttributeError)
|
||||||
if opt_attr is not AttributeError:
|
if opt_attr is not AttributeError:
|
||||||
must_warn.append(f"{opt_name}={opt_attr}")
|
must_warn.append(f"{opt_name}={opt_attr}")
|
||||||
|
opts[opt_name] = True
|
||||||
elif opt_name in known_marks:
|
elif opt_name in known_marks:
|
||||||
must_warn.append(f"{opt_name}=True")
|
must_warn.append(f"{opt_name}=True")
|
||||||
if hasattr(method, opt_name) or opt_name in known_marks:
|
|
||||||
opts[opt_name] = True
|
opts[opt_name] = True
|
||||||
else:
|
else:
|
||||||
opts[opt_name] = False
|
opts[opt_name] = False
|
||||||
|
|
Loading…
Reference in New Issue