Skip to content

Commit ec31991

Browse files
fix: type Markable is reduced to Any by mypy
This change simplifies the definition of `Markable` so that type information is not lost.
1 parent 364bbe4 commit ec31991

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_pytest/mark/structures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def combined_with(self, other: "Mark") -> "Mark":
266266
# A generic parameter designating an object to which a Mark may
267267
# be applied -- a test function (callable) or class.
268268
# Note: a lambda is not allowed, but this can't be represented.
269-
Markable = TypeVar("Markable", bound=Union[Callable[..., object], type])
269+
Markable = TypeVar("Markable", bound=Callable)
270270

271271

272272
@attr.s(init=False, auto_attribs=True)

0 commit comments

Comments
 (0)