[PATCH] scripts/igt_doc: fix a deprecation warning

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Jul 16 10:53:56 UTC 2025


Hi Michael,
On 2025-07-15 at 12:24:36 -0400, Michael J. Ruhl wrote:
> The regular expression usage has count as the third parameter,
> which results in this error message:
> 
> DeprecationWarning: 'count' is passed as positional argument
> 
> So the current usage incorrectly uses the flag value as a count.
> 
> Specify the parameter name to get the correct usage.
> 
> Signed-off-by: Michael J. Ruhl <michael.j.ruhl at intel.com>

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

> ---
>  scripts/igt_doc.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/igt_doc.py b/scripts/igt_doc.py
> index fa2c2c7ca..3a37a9701 100755
> --- a/scripts/igt_doc.py
> +++ b/scripts/igt_doc.py
> @@ -37,7 +37,7 @@ class IgtTestList(TestList):
>                  run_type = "other"
>              else:
>                  for driver in self.drivers:
> -                    result = re.sub(r"^" + driver + r"[\W_]*", "", run_type, re.IGNORECASE)
> +                    result = re.sub(r"^" + driver + r"[\W_]*", "", run_type, flags = re.IGNORECASE)
>                      if result != run_type:
>                          driver_set = set([driver])
>                          run_type = result
> -- 
> 2.50.0
> 


More information about the igt-dev mailing list