Fix: Deprecate use of 'True' in render_collapsed (#635)

This commit is contained in:
Jim Brännlund 2023-04-08 18:17:34 +02:00 committed by GitHub
parent 5f580273a9
commit f1bd1ebbee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -48,6 +48,13 @@ class BaseReport:
collapsed = config.getini("render_collapsed")
if collapsed:
if collapsed.lower() == "true":
warnings.warn(
"'render_collapsed = True' is deprecated and support "
"will be removed in the next major release. "
"Please use 'render_collapsed = all' instead.",
DeprecationWarning,
)
self.set_data(
"collapsed", [outcome.lower() for outcome in collapsed.split(",")]
)