Skip to content

Handle classes in inspect when methods=True#1874

Merged
willmcgugan merged 2 commits intomasterfrom
inspect-methods-bugfix
Jan 27, 2022
Merged

Handle classes in inspect when methods=True#1874
willmcgugan merged 2 commits intomasterfrom
inspect-methods-bugfix

Conversation

@darrenburns
Copy link
Member

@darrenburns darrenburns commented Jan 27, 2022

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Removes assumption that all callables should be prefixed with def/ account for classes in inspect().

@darrenburns darrenburns linked an issue Jan 27, 2022 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2022

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.58%. Comparing base (e839bfb) to head (8ceeb83).
Report is 1751 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1874      +/-   ##
==========================================
- Coverage   99.82%   99.58%   -0.24%     
==========================================
  Files          71       71              
  Lines        6943     7031      +88     
==========================================
+ Hits         6931     7002      +71     
- Misses         12       29      +17     
Flag Coverage Δ
unittests 99.58% <100.00%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@willmcgugan willmcgugan merged commit fcd684d into master Jan 27, 2022
@willmcgugan willmcgugan deleted the inspect-methods-bugfix branch January 27, 2022 16:46
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jan 31, 2022
11.1.0 - 2022-01-28

Added

Add Syntax.guess_lexer, add support for more lexers (e.g. Django templates etc.) Textualize/rich#1869
Add lexer parameter to Syntax.from_path to allow for overrides Textualize/rich#1873

Fixed

Workaround for edge case of object from Faiss with no __class__ Textualize/rich#1838
Ensure Syntax always justifies left Textualize/rich#1872
Handle classes in inspect when methods=True Textualize/rich#1874
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.

[BUG] rich.inspect shows classes as functions

3 participants