Skip to content

Conversation

@TTsangSC
Copy link
Collaborator

@TTsangSC TTsangSC commented Jul 6, 2025

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) API
  • kernprof.py
    • main(), _write_preimports():
      Minor formatting fixes for stdout/logging output
    • _dump_filtered_stats():
      Fixed error (by early-exiting) because kernprof.ContextualProfile is incompatible with (and doesn't need) the filtering of profiling results
    • _main_profile():
      Unnested redundant try block, and stopped suppressing BaseExceptions (since the profiling output is written anyway)
  • line_profiler/profiler_mixin.py::ByCountProfilerMixin
    • _get_underlying_functions():
      • Refactored section handling classes and properties into separate methods to reduce complexity
      • Refactored away use of functools.partial where possible
      • Added clarifying comments
    • wrap_class():
      Refactored away use of functools.partial where possible
  • tests/test_kernprof.py::test_kernprof_verbosity():
    Scrubbed remnant of tests for code output (removed in 447ab0a to 1b88d97)

TTsangSC added 5 commits July 7, 2025 00:28
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
Copy link

codecov bot commented Jul 6, 2025

Codecov Report

Attention: Patch coverage is 41.93548% with 18 lines in your changes missing coverage. Please review.

Project coverage is 69.14%. Comparing base (0b8cc7e) to head (733495c).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
line_profiler/profiler_mixin.py 41.93% 18 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Files with missing lines Coverage Δ
line_profiler/profiler_mixin.py 41.92% <41.93%> (+1.45%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0d117d...733495c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Erotemic Erotemic merged commit 7d2c415 into pyutils:main Jul 6, 2025
34 of 36 checks passed
@TTsangSC TTsangSC deleted the post-337-patches branch July 7, 2025 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants