Skip to content

Commit ae73461

Browse files
Add int and float variants to Parser.addini (#13560)
Fixes #13559. --------- Co-authored-by: Bruno Oliveira <[email protected]>
1 parent cc580b5 commit ae73461

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

changelog/13559.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added missing `int` and `float` variants to the `Literal` type annotation of the `type` parameter in :meth:`pytest.Parser.addini`.

src/_pytest/config/argparsing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ def addini(
174174
self,
175175
name: str,
176176
help: str,
177-
type: Literal["string", "paths", "pathlist", "args", "linelist", "bool"]
177+
type: Literal[
178+
"string", "paths", "pathlist", "args", "linelist", "bool", "int", "float"
179+
]
178180
| None = None,
179181
default: Any = NOT_SET,
180182
) -> None:

0 commit comments

Comments
 (0)