Skip to content

Commit cc1dcdf

Browse files
authored
Merge branch 'main' into fixturelookuperror_empty_stack
2 parents 225d910 + 76b8870 commit cc1dcdf

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: "v0.7.2"
3+
rev: "v0.7.3"
44
hooks:
55
- id: ruff
66
args: ["--fix"]

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ disable = [
213213
"condition-evals-to-constant",
214214
"consider-alternative-union-syntax",
215215
"confusing-consecutive-elif",
216-
"consider-using-any-or-all",
217216
"consider-using-assignment-expr",
218217
"consider-using-dict-items",
219218
"consider-using-from-import",

src/_pytest/mark/__init__.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,7 @@ def __call__(self, subname: str, /, **kwargs: str | int | bool | None) -> bool:
193193
if kwargs:
194194
raise UsageError("Keyword expressions do not support call parameters.")
195195
subname = subname.lower()
196-
names = (name.lower() for name in self._names)
197-
198-
for name in names:
199-
if subname in name:
200-
return True
201-
return False
196+
return any(subname in name.lower() for name in self._names)
202197

203198

204199
def deselect_by_keyword(items: list[Item], config: Config) -> None:
@@ -243,10 +238,9 @@ def __call__(self, name: str, /, **kwargs: str | int | bool | None) -> bool:
243238
if not (matches := self.own_mark_name_mapping.get(name, [])):
244239
return False
245240

246-
for mark in matches:
241+
for mark in matches: # pylint: disable=consider-using-any-or-all
247242
if all(mark.kwargs.get(k, NOT_SET) == v for k, v in kwargs.items()):
248243
return True
249-
250244
return False
251245

252246

0 commit comments

Comments
 (0)