Commit 242fc57
committed
Implementing fix suggested in #426
CHANGELOG.rst
Added entry
line_profiler/line_profiler.py::LineProfiler._add_namespace(...)
Removed unnecessary `typing.cast()` in default arguments
line_profiler/line_profiler_utils.py
_StrEnum
New alias which resolves:
- Statically, always to `enum.StrEnum`
- At the runtime, also thereto if available, and to
`_StrEnumBase` otherwise
StringEnum
Now always "statically" inheriting from `_StrEnum` to make
things less confusing to the type-checker1 parent 3dd2008 commit 242fc57
3 files changed
Lines changed: 13 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
612 | 606 | | |
613 | 607 | | |
614 | 608 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
0 commit comments