Commit 4651635
committed
Tighten annotation of logging.getLevelName
To better reflect the implementation's behaviour,
python#2730 changed
`logging.getLevelName` to accept `int | str` and return `Any` (the
latter due to the need to avoid union return types). However, this
isn't ideal if you're passing in an `int`, in which case the
implementation always returns a `str`. Add overloads for this.
This is all arguably a bit unfortunate in light of
python#1842 (comment),
but I don't want to relitigate that here. I've at least left a comment.1 parent e285e52 commit 4651635
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
575 | | - | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
576 | 582 | | |
577 | 583 | | |
578 | 584 | | |
| |||
0 commit comments