Post-337 patches: docs, fixes, minor refactoring#353
Merged
Erotemic merged 5 commits intopyutils:mainfrom Jul 6, 2025
Merged
Conversation
line_profiler/profiler_mixin.py::ByCountProfilerMixin
_get_underlying_functions()
- Added comments
- Split up implementation
_get_underlying_functions_from_{property,type}()
New helper methods split from `._get_underlying_functions()`
wrap_class()
Removed gratuitous use of `functools.partial`
kernprof.py::_main_profile()
- Unnested the `try` block
- Removed explicit suppression of `KeyboardInterrupt` and
`SystemExit`
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #353 +/- ##
==========================================
- Coverage 69.45% 69.14% -0.32%
==========================================
Files 18 18
Lines 1611 1614 +3
Branches 341 344 +3
==========================================
- Hits 1119 1116 -3
- Misses 415 420 +5
- Partials 77 78 +1
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Miscellaneous stuff that was discussed during #337 but didn't make the cut before the merge.
docs/**/*.rst:Removed the
:private-members:directive so that we don't give mixed signals as to what is in the public(-ly documented) APIkernprof.pymain(),_write_preimports():Minor formatting fixes for stdout/logging output
_dump_filtered_stats():Fixed error (by early-exiting) because
kernprof.ContextualProfileis incompatible with (and doesn't need) the filtering of profiling results_main_profile():Unnested redundant
tryblock, and stopped suppressingBaseExceptions (since the profiling output is written anyway)line_profiler/profiler_mixin.py::ByCountProfilerMixin_get_underlying_functions():functools.partialwhere possiblewrap_class():Refactored away use of
functools.partialwhere possibletests/test_kernprof.py::test_kernprof_verbosity():Scrubbed remnant of tests for code output (removed in 447ab0a to 1b88d97)