-
Notifications
You must be signed in to change notification settings - Fork 67
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
Wrapping doesn't work at all when there is an argument list? #174
Labels
C: stakeholder
Relates to docformatter stakeholder requested behavior
question
Questions related to docformatter
Milestone
Comments
weibullguy
added
question
Questions related to docformatter
and removed
fresh
This is a new issue
labels
Apr 10, 2023
weibullguy
added
the
C: stakeholder
Relates to docformatter stakeholder requested behavior
label
Apr 25, 2023
+1, docformatter is wrapping summaries nicely for me but not descriptions (i.e. the paragraph under the summary): docformatter \
--wrap-summaries 120 \
--wrap-descriptions 120 \
--in-place \
--pre-summary-newline \
--close-quotes-on-newline \
--recursive \
. This second line should be reformatted into a small paragraph but is not: """
Initializes a new model and infers the task type from the model definitions.
This method creates a new model instance based on the provided configuration file. It loads the model configuration, infers the task type if not specified, and initializes the model using the appropriate class from the task map.
Parameters:
cfg (str): Path to the model configuration file in YAML format.
task (str | None): The specific task for the model. If None, it will be inferred from the config.
model (torch.nn.Module | None): A custom model instance. If provided, it will be used instead of creating a new one.
verbose (bool): If True, displays model information during loading.
Raises:
ValueError: If the configuration file is invalid or the task cannot be inferred.
ImportError: If the required dependencies for the specified task are not installed.
Examples:
>>> model = Model()
>>> model._new('yolov8n.yaml', task='detect', verbose=True)
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C: stakeholder
Relates to docformatter stakeholder requested behavior
question
Questions related to docformatter
I may be ignorant or missing something. Here are some examples:
Running docformatter on the above does nothing, unless I specify
--force-wrap
which does what I want for the long line, but botches the argument list:Compare to what happens if I remove the lists, and also remove
--force-wrap
:Is wrapping all or nothing; if there are lists no lines get wrapped? Or are my arg/returns lists malformed? Any insight is appreciated!
The text was updated successfully, but these errors were encountered: