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

Add documentation for statistics() and aclose() on memory channels #3101

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

A5rocks
Copy link
Contributor

@A5rocks A5rocks commented Oct 5, 2024

I'm pretty sure the reason Sphinx isn't showing them is because they have no docstrings. Easy fix.

Mentioned on Gitter.

Copy link

codecov bot commented Oct 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.58338%. Comparing base (498325d) to head (da4882c).
Report is 324 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##                main       #3101   +/-   ##
=============================================
  Coverage   99.58338%   99.58338%           
=============================================
  Files            121         121           
  Lines          18002       18002           
  Branches        3248        3248           
=============================================
  Hits           17927       17927           
  Misses            52          52           
  Partials          23          23           
Files with missing lines Coverage Δ
src/trio/__init__.py 100.00000% <ø> (ø)
src/trio/_channel.py 100.00000% <100.00000%> (ø)

@A5rocks
Copy link
Contributor Author

A5rocks commented Oct 5, 2024

pre-commit.ci autofix

@A5rocks A5rocks force-pushed the document-statistics branch from 443813e to 27aef3d Compare October 5, 2024 09:32
@@ -111,7 +111,7 @@ def __init__(self, max_buffer_size: int | float): # noqa: PYI041


@attrs.frozen
class MemoryChannelStats:
class MemoryChannelStatistics:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is backwards compatible as far as we care.

Copy link
Member

Choose a reason for hiding this comment

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

If it wasn't publicaly re-exported originally, I would think this should count as backwards compatible, and if anyone does have issues we can tell them its their fault for digging into Trio's internals.

Copy link
Member

@CoolCat467 CoolCat467 left a comment

Choose a reason for hiding this comment

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

Looks good to me, don't foresee any issues with this.

Copy link
Contributor

@TeamSpen210 TeamSpen210 left a comment

Choose a reason for hiding this comment

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

Looks good.

@TeamSpen210 TeamSpen210 merged commit 5d9067b into python-trio:main Oct 7, 2024
38 checks passed
@A5rocks A5rocks deleted the document-statistics branch October 7, 2024 09:58
Comment on lines +23 to +24
"No docstring found for class \"trio.MemoryChannelStatistics\"",
"No docstring found for class \"trio._channel.MemoryChannelStatistics\"",
Copy link
Member

Choose a reason for hiding this comment

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

I guess you could've added a docstring to the class at the same time to get rid of these as well

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.

4 participants