[ruff] Activate use next(iter(x)) instead of list(x)[0] and fix issue
This commit is contained in:
parent
180a16a344
commit
8967c527ff
|
@ -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]
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue