Skip to content

Commit

Permalink
Remove extra quotes from litteral strings
Browse files Browse the repository at this point in the history
These extra pairs of quotes were left-over by automated formatting runs
such as #149 / ab77f7d.
  • Loading branch information
DimitriPapadopoulos committed Mar 10, 2024
1 parent 38b58a5 commit f276e30
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion distutils/_msvccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def initialize(self, plat_name=None):
vc_env = _get_vc_env(plat_spec)
if not vc_env:
raise DistutilsPlatformError(
"Unable to find a compatible " "Visual Studio installation."
"Unable to find a compatible Visual Studio installation."
)
self._configure(vc_env)

Expand Down
4 changes: 2 additions & 2 deletions distutils/ccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
)
else:
raise TypeError(
"'runtime_library_dirs' (if supplied) " "must be a list of strings"
"'runtime_library_dirs' (if supplied) must be a list of strings"
)

return (libraries, library_dirs, runtime_library_dirs)
Expand Down Expand Up @@ -1246,7 +1246,7 @@ def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries):
lib_opts.append(lib_file)
else:
compiler.warn(
"no library file corresponding to " "'%s' found (skipping)" % lib
"no library file corresponding to '%s' found (skipping)" % lib
)
else:
lib_opts.append(compiler.library_option(lib))
Expand Down
6 changes: 3 additions & 3 deletions distutils/command/bdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ class bdist(Command):
(
'dist-dir=',
'd',
"directory to put final built distributions in " "[default: dist]",
"directory to put final built distributions in [default: dist]",
),
('skip-build', None, "skip rebuilding everything (for testing/debugging)"),
(
'owner=',
'u',
"Owner name used when creating a tar file" " [default: current user]",
"Owner name used when creating a tar file [default: current user]",
),
(
'group=',
'g',
"Group name used when creating a tar file" " [default: current group]",
"Group name used when creating a tar file [default: current group]",
),
]

Expand Down
8 changes: 4 additions & 4 deletions distutils/command/bdist_dumb.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class bdist_dumb(Command):
(
'format=',
'f',
"archive format to create (tar, gztar, bztar, xztar, " "ztar, zip)",
"archive format to create (tar, gztar, bztar, xztar, ztar, zip)",
),
(
'keep-temp',
Expand All @@ -40,17 +40,17 @@ class bdist_dumb(Command):
(
'relative',
None,
"build the archive using relative paths " "(default: false)",
"build the archive using relative paths (default: false)",
),
(
'owner=',
'u',
"Owner name used when creating a tar file" " [default: current user]",
"Owner name used when creating a tar file [default: current user]",
),
(
'group=',
'g',
"Group name used when creating a tar file" " [default: current group]",
"Group name used when creating a tar file [default: current group]",
),
]

Expand Down
6 changes: 3 additions & 3 deletions distutils/command/bdist_rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class bdist_rpm(Command):
(
'dist-dir=',
'd',
"directory to put final RPM files in " "(and .spec files if --spec-only)",
"directory to put final RPM files in (and .spec files if --spec-only)",
),
(
'python=',
Expand Down Expand Up @@ -75,7 +75,7 @@ class bdist_rpm(Command):
(
'packager=',
None,
"RPM packager (eg. \"Jane Doe <jane@example.net>\") " "[default: vendor]",
"RPM packager (eg. \"Jane Doe <jane@example.net>\") [default: vendor]",
),
('doc-files=', None, "list of documentation files (space or comma-separated)"),
('changelog=', None, "RPM changelog"),
Expand Down Expand Up @@ -214,7 +214,7 @@ def finalize_options(self):

if os.name != 'posix':
raise DistutilsPlatformError(
"don't know how to create RPM " "distributions on platform %s" % os.name
"don't know how to create RPM distributions on platform %s" % os.name
)
if self.binary_only and self.source_only:
raise DistutilsOptionError(
Expand Down
2 changes: 1 addition & 1 deletion distutils/command/build_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def check_extensions_list(self, extensions): # noqa: C901
ext.runtime_library_dirs = build_info.get('rpath')
if 'def_file' in build_info:
log.warning(
"'def_file' element of build info dict " "no longer supported"
"'def_file' element of build info dict no longer supported"
)

# Non-trivial stuff: 'macros' split into 'define_macros'
Expand Down
2 changes: 1 addition & 1 deletion distutils/command/build_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _validate_shebang(shebang, encoding):
shebang.encode('utf-8')
except UnicodeEncodeError:
raise ValueError(
"The shebang ({!r}) is not encodable " "to utf-8".format(shebang)
"The shebang ({!r}) is not encodable to utf-8".format(shebang)
)

# If the script is encoded to a custom encoding (use a
Expand Down
2 changes: 1 addition & 1 deletion distutils/command/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ def run(self):
# internally, and not to sys.path, so we don't check the platform
# matches what we are running.
if self.warn_dir and build_plat != get_platform():
raise DistutilsPlatformError("Can't install when " "cross-compiling")
raise DistutilsPlatformError("Can't install when cross-compiling")

# Run all sub-commands (at least those that need to be run)
for cmd_name in self.get_sub_commands():
Expand Down
4 changes: 2 additions & 2 deletions distutils/command/sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def checking_metadata(self):
(
'manifest-only',
'o',
"just regenerate the manifest and then stop " "(implies --force-manifest)",
"just regenerate the manifest and then stop (implies --force-manifest)",
),
(
'force-manifest',
Expand All @@ -80,7 +80,7 @@ def checking_metadata(self):
(
'dist-dir=',
'd',
"directory to put the source distribution archive(s) in " "[default: dist]",
"directory to put the source distribution archive(s) in [default: dist]",
),
(
'metadata-check',
Expand Down
6 changes: 3 additions & 3 deletions distutils/fancy_getopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ def _check_alias_dict(self, aliases, what):
for alias, opt in aliases.items():
if alias not in self.option_index:
raise DistutilsGetoptError(
("invalid %s '%s': " "option '%s' not defined")
("invalid %s '%s': option '%s' not defined")
% (what, alias, alias)
)
if opt not in self.option_index:
raise DistutilsGetoptError(
("invalid %s '%s': " "aliased option '%s' not defined")
("invalid %s '%s': aliased option '%s' not defined")
% (what, alias, opt)
)

Expand Down Expand Up @@ -162,7 +162,7 @@ def _grok_option_table(self): # noqa: C901
# Type- and value-check the option names
if not isinstance(long, str) or len(long) < 2:
raise DistutilsGetoptError(
("invalid long option '%s': " "must be a string of length >= 2")
("invalid long option '%s': must be a string of length >= 2")
% long
)

Expand Down
4 changes: 2 additions & 2 deletions distutils/filelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def process_template_line(self, line): # noqa: C901
for pattern in patterns:
if not self.include_pattern(pattern, prefix=dir):
msg = (
"warning: no files found matching '%s' " "under directory '%s'"
"warning: no files found matching '%s' under directory '%s'"
)
log.warning(msg, pattern, dir)

Expand All @@ -189,7 +189,7 @@ def process_template_line(self, line): # noqa: C901
self.debug_print("prune " + dir_pattern)
if not self.exclude_pattern(None, prefix=dir_pattern):
log.warning(
("no previously-included directories found " "matching '%s'"),
("no previously-included directories found matching '%s'"),
dir_pattern,
)
else:
Expand Down
10 changes: 5 additions & 5 deletions distutils/tests/test_cygwinccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,25 @@ def test_get_msvcr(self):

# MSVC 7.0
sys.version = (
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.1300 32 bits (Intel)]'
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1300 32 bits (Intel)]'
)
assert get_msvcr() == ['msvcr70']

# MSVC 7.1
sys.version = (
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.1310 32 bits (Intel)]'
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bits (Intel)]'
)
assert get_msvcr() == ['msvcr71']

# VS2005 / MSVC 8.0
sys.version = (
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.1400 32 bits (Intel)]'
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1400 32 bits (Intel)]'
)
assert get_msvcr() == ['msvcr80']

# VS2008 / MSVC 9.0
sys.version = (
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.1500 32 bits (Intel)]'
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1500 32 bits (Intel)]'
)
assert get_msvcr() == ['msvcr90']

Expand All @@ -111,7 +111,7 @@ def test_get_msvcr(self):

# unknown
sys.version = (
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) ' '[MSC v.2000 32 bits (Intel)]'
'2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.2000 32 bits (Intel)]'
)
with pytest.raises(ValueError):
get_msvcr()
4 changes: 2 additions & 2 deletions distutils/tests/test_sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ def test_customize_compiler(self):
assert comp.exes['preprocessor'] == 'env_cpp --env-cppflags'
assert comp.exes['compiler'] == 'env_cc --sc-cflags --env-cflags --env-cppflags'
assert comp.exes['compiler_so'] == (
'env_cc --sc-cflags ' '--env-cflags ' '--env-cppflags --sc-ccshared'
'env_cc --sc-cflags --env-cflags --env-cppflags --sc-ccshared'
)
assert comp.exes['compiler_cxx'] == 'env_cxx --env-cxx-flags'
assert comp.exes['linker_exe'] == 'env_cc'
assert comp.exes['linker_so'] == (
'env_ldshared --env-ldflags --env-cflags' ' --env-cppflags'
'env_ldshared --env-ldflags --env-cflags --env-cppflags'
)
assert comp.shared_lib_extension == 'sc_shutil_suffix'

Expand Down
2 changes: 1 addition & 1 deletion distutils/tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_cmp_strict(self):
continue
else:
raise AssertionError(
("cmp(%s, %s) " "shouldn't raise ValueError") % (v1, v2)
("cmp(%s, %s) shouldn't raise ValueError") % (v1, v2)
)
assert res == wanted, 'cmp({}, {}) should be {}, got {}'.format(
v1, v2, wanted, res
Expand Down
2 changes: 1 addition & 1 deletion distutils/text_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def readline(self): # noqa: C901
if self.join_lines and buildup_line:
# oops: end of file
if line is None:
self.warn("continuation line immediately precedes " "end-of-file")
self.warn("continuation line immediately precedes end-of-file")
return buildup_line

if self.collapse_join:
Expand Down

0 comments on commit f276e30

Please sign in to comment.