Reformat Markdown code blocks (#12795)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
2af71d15a6
commit
fceea033ad
128 changed files with 1067 additions and 1018 deletions
|
|
@ -57,19 +57,19 @@ When adding new functions or classes, please include a [Google-style docstring](
|
|||
|
||||
=== "Google-style"
|
||||
|
||||
This example shows both Google-style docstrings. Note that both input and output `types` must always be enclosed by parentheses, i.e. `(bool)`.
|
||||
This example shows a Google-style docstring. Note that both input and output `types` must always be enclosed by parentheses, i.e. `(bool)`.
|
||||
```python
|
||||
def example_function(arg1, arg2=4):
|
||||
"""
|
||||
Example function that demonstrates Google-style docstrings.
|
||||
|
||||
|
||||
Args:
|
||||
arg1 (int): The first argument.
|
||||
arg2 (int): The second argument. Default value is 4.
|
||||
|
||||
|
||||
Returns:
|
||||
(bool): True if successful, False otherwise.
|
||||
|
||||
|
||||
Examples:
|
||||
>>> result = example_function(1, 2) # returns False
|
||||
"""
|
||||
|
|
@ -80,19 +80,19 @@ When adding new functions or classes, please include a [Google-style docstring](
|
|||
|
||||
=== "Google-style with type hints"
|
||||
|
||||
This example shows both Google-style docstrings and argument and return type hints, though both are not required, one can be used without the other.
|
||||
This example shows both a Google-style docstring and argument and return type hints, though both are not required, one can be used without the other.
|
||||
```python
|
||||
def example_function(arg1: int, arg2: int = 4) -> bool:
|
||||
"""
|
||||
Example function that demonstrates Google-style docstrings.
|
||||
|
||||
|
||||
Args:
|
||||
arg1: The first argument.
|
||||
arg2: The second argument. Default value is 4.
|
||||
|
||||
|
||||
Returns:
|
||||
True if successful, False otherwise.
|
||||
|
||||
|
||||
Examples:
|
||||
>>> result = example_function(1, 2) # returns False
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ To gain insight into the current configuration of your settings, you can view th
|
|||
print(settings)
|
||||
|
||||
# Return analytics and crash reporting setting
|
||||
value = settings['sync']
|
||||
value = settings["sync"]
|
||||
```
|
||||
|
||||
=== "CLI"
|
||||
|
|
@ -106,7 +106,7 @@ Ultralytics allows users to easily modify their settings. Changes can be perform
|
|||
from ultralytics import settings
|
||||
|
||||
# Disable analytics and crash reporting
|
||||
settings.update({'sync': False})
|
||||
settings.update({"sync": False})
|
||||
|
||||
# Reset settings to default values
|
||||
settings.reset()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue