Repository navigation
Doc-strings: 'Optional, ' exactly for the parameters with a default - #545
Merged
Merged
Conversation
A parameter's ':param:' description opens with 'Optional, ' if and only
if the parameter has a default value, as the coding guide asks:
* 25 parameters with a default gained it: the '__exit__' parameters of
the context managers, 'dest' of the three ArgParse flags, 'kind' of
'BaseEdge'.
* 56 parameters without a default lost it, mostly ones annotated
'Nullable[...]': they accept None, but must be passed.
'StringEnum.Parse' named a default ('None') its 'value' doesn't have.
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This was referenced Oct 12, 2026
Merged
Merged
Merged
Merged
This was referenced Oct 20, 2026
Merged
Merged
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation
:param:description opens withOptional,exactly when the parameter has a default value, asthe coding guide asks (
python3 CheckDocstrings.py --check optional pyTooling: 81 → 0).exc_type/exc_val/exc_tbparameters of seven__exit__methods,
destof the three ArgParse flags,kindofGraph.BaseEdge. The rest of the sentence starts in lowercase; "Exception type" and "Exception instance" got the missing period.
Nullable[...]: they acceptNone, but must bepassed. The sentence now starts in upper case.
StringEnum.Parse'svaluenamed a default (Default: ``None``.) it doesn't have; removed.destlines were rewrapped (127 columns otherwise).doc/News.rst: an entry in v10's Documentation.pyTooling.GraphpyTooling.WarningpyTooling.PackagingpyTooling.FilesystempyTooling.StopwatchpyTooling.TracingpyTooling.Graph.GraphMLpyTooling.CommonpyTooling.Dependency.PythonpyTooling.MetaClassespyTooling.VersioningpyTooling.Attributes.ArgParse(Flag,KeyValueFlag,OptionalValuedFlag)pyTooling.TreepyTooling.TerminalUIpyTooling.CLIAbstraction,pyTooling.Exceptions,pyTooling.GenericPath,pyTooling.GenericPath.URLTests
CheckDocstrings.py --check optional pyTooling: 0 problems (was 81); the default checks (params, fields, returns,summary): 0.
CheckAlignment.py,CheckFieldComments.py,CheckBlankLines.py,CheckProperties.py,CheckAnnotations.py: 0;CheckRaises.py: 18 hints, unchanged.pytest tests/unit: 2511 passed, 31 skipped, 3 xfailed.Related Issues and Pull-Requests