diff --git a/pyproject.toml b/pyproject.toml index d02beb0bc..723da45dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -160,7 +160,6 @@ ignore = [ # ruff ignore "RUF005", # Consider `(x, *y)` instead of concatenation "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` - "RUF015", # Prefer `next(iter(x))` over single element slice ] [tool.ruff.format] diff --git a/testing/python/collect.py b/testing/python/collect.py index 4d1f97b34..745550f07 100644 --- a/testing/python/collect.py +++ b/testing/python/collect.py @@ -1209,7 +1209,7 @@ class TestReportInfo: classcol = pytester.collect_by_name(modcol, "TestClass") assert isinstance(classcol, Class) path, lineno, msg = classcol.reportinfo() - func = list(classcol.collect())[0] + func = next(iter(classcol.collect())) assert isinstance(func, Function) path, lineno, msg = func.reportinfo()