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 typing of need docname/lineno #1134

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Conversation

chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented Feb 26, 2024

Account for these being None for external needs, that have no source mapping within the project

Practically, if is_external is False then docname/lineno arestr, but if is_external is True then docname/lineno are None.
This internal relationship is difficult to encode in the type system though.
So here we always account for docname is None, even if we have already checked for is_external is False

Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 78.04878% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 85.94%. Comparing base (3343ea0) to head (9c023b2).

Files Patch % Lines
sphinx_needs/layout.py 58.33% 5 Missing ⚠️
sphinx_needs/directives/needfilter.py 50.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1134      +/-   ##
==========================================
+ Coverage   85.92%   85.94%   +0.01%     
==========================================
  Files          56       56              
  Lines        6531     6539       +8     
==========================================
+ Hits         5612     5620       +8     
  Misses        919      919              
Flag Coverage Δ
pytests 85.94% <78.04%> (+0.01%) ⬆️

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.

Co-Authored-By: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@chrisjsewell chrisjsewell force-pushed the fix-docname-lineno-none branch from 9b02245 to 9c023b2 Compare February 28, 2024 10:58
@chrisjsewell chrisjsewell merged commit ebb8f21 into master Feb 28, 2024
18 checks passed
@chrisjsewell chrisjsewell deleted the fix-docname-lineno-none branch February 28, 2024 11:35
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