Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2528 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 80 81 +1
Lines 2485 2684 +199
Branches 437 44 -393
==========================================
+ Hits 2485 2684 +199 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Should we add this into CONTRIBUTING? DocumentationWe document all module-level values MAX_RETRIES: Final = 3
"""Maximum number of retries for a single request."""See also https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#doc-comments-and-docstrings |
| ) | ||
| from returns.context.requires_context_result import RequiresContextResult | ||
|
|
||
| # Context: |
There was a problem hiding this comment.
These are comments, not docs :)
|
|
||
|
|
||
| # Type Aliases: | ||
| #: Sometimes ``RequiresContext`` and other similar types might be used with |
There was a problem hiding this comment.
Same here, conver this to comments
| #: This field has an extra 'RequiresContext' just because `mypy` needs it. | ||
| _inner_value: Callable[[_EnvType_contra], _ReturnType_co] | ||
| """ | ||
| This field has an extra 'RequiresContext' |
There was a problem hiding this comment.
Please, open a new issue in WPS: we must enforce the same style of docs that we use for docstrings. One line, . in the end.
There was a problem hiding this comment.
Thank you for the clarification! So you mean the formatting style itself. Currently I have:
"""
This field has an extra 'RequiresContext'
just because `mypy` needs it."""
But you want it to follow the docstring convention?
"""This field has an extra 'RequiresContext' just because `mypy` needs it."""
I understand the concern about the 80-character line limit. How should we handle longer docstrings that exceed this limit?
There was a problem hiding this comment.
the same style of docs that we use for docstrings
What is the rule (WPS code)?
There was a problem hiding this comment.
I'm a bit confused :)
There was a problem hiding this comment.
This is a ruff rule:
D415 First line should end with a period, question mark, or exclamation point
--> ex.py:2:5
|
1 | def some():
2 | """Ss"""
| ^^^^^^^^
help: Add closing punctuation
and
D205 1 blank line required between summary line and description
--> ex.py:2:5
|
1 | def some():
2 | / """First line
3 | | second line
4 | | """
| |_______^
help: Insert single blank line
D415 First line should end with a period, question mark, or exclamation point
--> ex.py:2:5
|
1 | def some():
2 | / """First line
3 | | second line
4 | | """
| |_______^
help: Add closing punctuation
But, these rules are not enforced for attr-level docs. This should be proposed and fixed in ruff :)
| ) | ||
| from returns.context.requires_context_result import RequiresContextResult | ||
|
|
||
| # Context: |
Closes #2527