Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #11275: _get_doc_blocks is crashing parsing if .format is called #11310

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

aranke
Copy link
Member

@aranke aranke commented Feb 14, 2025

Resolves #11275

Problem

_get_doc_blocks was crashing if we used .format on a string or doc block.

Solution

Add an additional check in _get_doc_blocks and a couple tests.

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

@cla-bot cla-bot bot added the cla:yes label Feb 14, 2025
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.91%. Comparing base (7041e58) to head (ed0d75e).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11310      +/-   ##
==========================================
- Coverage   88.95%   88.91%   -0.05%     
==========================================
  Files         189      189              
  Lines       24169    24170       +1     
==========================================
- Hits        21500    21490      -10     
- Misses       2669     2680      +11     
Flag Coverage Δ
integration 86.17% <ø> (-0.11%) ⬇️
unit 62.53% <ø> (+<0.01%) ⬆️

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

Components Coverage Δ
Unit Tests 62.53% <ø> (+<0.01%) ⬆️
Integration Tests 86.17% <ø> (-0.11%) ⬇️

@aranke aranke changed the title Fix #11275: get_doc_blocks is crashing parsing Fix #11275: _get_doc_blocks is crashing parsing Feb 18, 2025
@aranke aranke changed the title Fix #11275: _get_doc_blocks is crashing parsing Fix #11275: _get_doc_blocks is crashing parsing if .format is called Feb 18, 2025
@aranke aranke merged commit 2ba765d into main Feb 18, 2025
60 of 61 checks passed
@aranke aranke deleted the fix_11275 branch February 18, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] AttributeError: 'Getattr' object has no attribute 'name' 1.10.0-a1 in _get_doc_blocks during parsing
2 participants