Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b8b263b

Browse files
committed
Reformat docstrings.
1 parent cb1f4c4 commit b8b263b

1 file changed

Lines changed: 23 additions & 24 deletions

File tree

Lib/distutils/util.py

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ def get_platform ():
5959

6060

6161
def convert_path (pathname):
62-
"""Return 'pathname' as a name that will work on the native
63-
filesystem, i.e. split it on '/' and put it back together again
64-
using the current directory separator. Needed because filenames in
65-
the setup script are always supplied in Unix style, and have to be
66-
converted to the local convention before we can actually use them in
67-
the filesystem. Raises ValueError if 'pathname' is
68-
absolute (starts with '/') or contains local directory separators
69-
(unless the local separator is '/', of course)."""
70-
62+
"""Return 'pathname' as a name that will work on the native filesystem,
63+
i.e. split it on '/' and put it back together again using the current
64+
directory separator. Needed because filenames in the setup script are
65+
always supplied in Unix style, and have to be converted to the local
66+
convention before we can actually use them in the filesystem. Raises
67+
ValueError if 'pathname' is absolute (starts with '/') or contains
68+
local directory separators (unless the local separator is '/', of
69+
course).
70+
"""
7171
if os.sep == '/':
7272
return pathname
7373
if pathname[0] == '/':
@@ -116,13 +116,12 @@ def change_root (new_root, pathname):
116116
_environ_checked = 0
117117
def check_environ ():
118118
"""Ensure that 'os.environ' has all the environment variables we
119-
guarantee that users can use in config files, command-line
120-
options, etc. Currently this includes:
121-
HOME - user's home directory (Unix only)
122-
PLAT - description of the current platform, including hardware
123-
and OS (see 'get_platform()')
119+
guarantee that users can use in config files, command-line options,
120+
etc. Currently this includes:
121+
HOME - user's home directory (Unix only)
122+
PLAT - description of the current platform, including hardware
123+
and OS (see 'get_platform()')
124124
"""
125-
126125
global _environ_checked
127126
if _environ_checked:
128127
return
@@ -138,15 +137,15 @@ def check_environ ():
138137

139138

140139
def subst_vars (str, local_vars):
141-
"""Perform shell/Perl-style variable substitution on 'string'.
142-
Every occurrence of '$' followed by a name, or a name enclosed in
143-
braces, is considered a variable. Every variable is substituted by
144-
the value found in the 'local_vars' dictionary, or in 'os.environ'
145-
if it's not in 'local_vars'. 'os.environ' is first checked/
146-
augmented to guarantee that it contains certain values: see
147-
'_check_environ()'. Raise ValueError for any variables not found in
148-
either 'local_vars' or 'os.environ'."""
149-
140+
"""Perform shell/Perl-style variable substitution on 'string'. Every
141+
occurrence of '$' followed by a name, or a name enclosed in braces, is
142+
considered a variable. Every variable is substituted by the value
143+
found in the 'local_vars' dictionary, or in 'os.environ' if it's not in
144+
'local_vars'. 'os.environ' is first checked/ augmented to guarantee
145+
that it contains certain values: see '_check_environ()'. Raise
146+
ValueError for any variables not found in either 'local_vars' or
147+
'os.environ'.
148+
"""
150149
check_environ()
151150
def _subst (match, local_vars=local_vars):
152151
var_name = match.group(1)

0 commit comments

Comments
 (0)