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

Trigger a warning when several docstrings are detected #802

Merged
merged 4 commits into from
Jul 4, 2024

Conversation

tristanlatr
Copy link
Contributor

Related to #800

This comment has been minimized.

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.59%. Comparing base (dca9625) to head (537fb05).

Files Patch % Lines
pydoctor/model.py 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #802      +/-   ##
==========================================
- Coverage   92.62%   92.59%   -0.03%     
==========================================
  Files          47       47              
  Lines        8393     8402       +9     
  Branches     1850     1853       +3     
==========================================
+ Hits         7774     7780       +6     
- Misses        356      357       +1     
- Partials      263      265       +2     

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

This comment has been minimized.

This comment has been minimized.

@@ -959,9 +959,7 @@ def _handlePropertyDef(self,
if tag == 'return':
if not pdoc.has_body:
pdoc = field.body()
# Avoid format_summary() going back to the original
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a drive-by cleanup. We don’t generated the summary from the docstring source anymore, so ne don’t need this hack.

@tristanlatr
Copy link
Contributor Author

I believe this PR is clean enough.

Copy link

Diff from pydoctor_primer, showing the effect of this PR on open source code:

pycma (https://github.com/CMA-ES/pycma)
+ /projects/pycma/cma/sampler.py:249: Existing docstring at line 244 is overriden

astroid (https://github.com/pylint-dev/astroid)
+ /projects/astroid/astroid/nodes/scoped_nodes/scoped_nodes.py:262: Existing docstring at line 259 is overriden
+ /projects/astroid/astroid/nodes/scoped_nodes/scoped_nodes.py:1908: Existing docstring at line 1852 is overriden

numpy (https://github.com/numpy/numpy)
+ /projects/numpy/numpy/distutils/ccompiler_opt.py:1038: Existing docstring at line 949 is overriden

@tristanlatr
Copy link
Contributor Author

Merging this

@tristanlatr tristanlatr merged commit 0743773 into master Jul 4, 2024
23 checks passed
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.

1 participant