Ruff format docstring Python code (#15792)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
c1882a4327
commit
d27664216b
63 changed files with 370 additions and 374 deletions
|
|
@ -28,13 +28,13 @@ class WorkingDirectory(contextlib.ContextDecorator):
|
|||
Examples:
|
||||
Using as a context manager:
|
||||
>>> with WorkingDirectory('/path/to/new/dir'):
|
||||
>>> # Perform operations in the new directory
|
||||
>>> # Perform operations in the new directory
|
||||
>>> pass
|
||||
|
||||
Using as a decorator:
|
||||
>>> @WorkingDirectory('/path/to/new/dir')
|
||||
>>> def some_function():
|
||||
>>> # Perform operations in the new directory
|
||||
>>> # Perform operations in the new directory
|
||||
>>> pass
|
||||
"""
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ def spaces_in_path(path):
|
|||
Use the context manager to handle paths with spaces:
|
||||
>>> from ultralytics.utils.files import spaces_in_path
|
||||
>>> with spaces_in_path('/path/with spaces') as new_path:
|
||||
>>> # Your code here
|
||||
>>> # Your code here
|
||||
"""
|
||||
|
||||
# If path has spaces, replace them with underscores
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue