mirror of
https://github.com/django/django.git
synced 2025-10-29 08:36:09 +00:00
Refs #27656 -- Updated django.utils docstring verbs according to PEP 257.
This commit is contained in:
committed by
Tim Graham
parent
98bcc5d81b
commit
9718fa2e8a
@@ -24,11 +24,11 @@ def npath(path):
|
||||
|
||||
def safe_join(base, *paths):
|
||||
"""
|
||||
Joins one or more path components to the base path component intelligently.
|
||||
Returns a normalized, absolute version of the final path.
|
||||
Join one or more path components to the base path component intelligently.
|
||||
Return a normalized, absolute version of the final path.
|
||||
|
||||
The final path must be located inside of the base path component (otherwise
|
||||
a ValueError is raised).
|
||||
Raise ValueError if the final path isn't located inside of the base path
|
||||
component.
|
||||
"""
|
||||
base = force_text(base)
|
||||
paths = [force_text(p) for p in paths]
|
||||
@@ -52,9 +52,9 @@ def safe_join(base, *paths):
|
||||
|
||||
def symlinks_supported():
|
||||
"""
|
||||
A function to check if creating symlinks are supported in the
|
||||
host platform and/or if they are allowed to be created (e.g.
|
||||
on Windows it requires admin permissions).
|
||||
Return whether or not creating symlinks are supported in the host platform
|
||||
and/or if they are allowed to be created (e.g. on Windows it requires admin
|
||||
permissions).
|
||||
"""
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
original_path = os.path.join(temp_dir, 'original')
|
||||
|
||||
Reference in New Issue
Block a user