Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions distutils/ccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,8 @@ def _check_macro_definitions(self, definitions):
and isinstance(defn[0], str)
):
raise TypeError(
(f"invalid macro definition '{defn}': ")
+ "must be tuple (string,), (string, string), or "
+ "(string, None)"
f"invalid macro definition '{defn}': "
"must be tuple (string,), (string, string), or (string, None)"
)

# -- Bookkeeping methods -------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions distutils/command/bdist_dumb.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ class bdist_dumb(Command):
(
'keep-temp',
'k',
"keep the pseudo-installation tree around after "
+ "creating the distribution archive",
"keep the pseudo-installation tree around after creating the distribution archive",
),
('dist-dir=', 'd', "directory to put final built distributions in"),
('skip-build', None, "skip rebuilding everything (for testing/debugging)"),
Expand Down
5 changes: 1 addition & 4 deletions distutils/command/bdist_rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,7 @@ def _make_spec_file(self): # noqa: C901
# that we open and interpolate into the spec file, but the defaults
# are just text that we drop in as-is. Hmmm.

install_cmd = (
f'{def_setup_call} install -O1 --root=$RPM_BUILD_ROOT '
'--record=INSTALLED_FILES'
)
install_cmd = f'{def_setup_call} install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES'

script_options = [
('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"),
Expand Down
3 changes: 1 addition & 2 deletions distutils/command/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ class build(Command):
(
'build-lib=',
None,
"build directory for all distribution (defaults to either "
+ "build-purelib or build-platlib",
"build directory for all distribution (defaults to either build-purelib or build-platlib",
),
('build-scripts=', None, "build directory for scripts"),
('build-temp=', 't', "temporary build directory"),
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 @@ -71,7 +71,7 @@ class build_ext(Command):
'inplace',
'i',
"ignore build-lib and put compiled extensions into the source "
+ "directory alongside your pure Python modules",
"directory alongside your pure Python modules",
),
(
'include-dirs=',
Expand Down
9 changes: 3 additions & 6 deletions distutils/command/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ class install(Command):
(
'install-platbase=',
None,
"base installation directory for platform-specific files "
+ "(instead of --exec-prefix or --home)",
"base installation directory for platform-specific files (instead of --exec-prefix or --home)",
),
('root=', None, "install everything relative to this alternate root directory"),
# Or, explicitly set the installation scheme
Expand All @@ -211,8 +210,7 @@ class install(Command):
(
'install-lib=',
None,
"installation directory for all module distributions "
+ "(overrides --install-purelib and --install-platlib)",
"installation directory for all module distributions (overrides --install-purelib and --install-platlib)",
),
('install-headers=', None, "installation directory for C/C++ headers"),
('install-scripts=', None, "installation directory for Python scripts"),
Expand Down Expand Up @@ -348,8 +346,7 @@ def finalize_options(self): # noqa: C901
self.install_base or self.install_platbase
):
raise DistutilsOptionError(
"must supply either prefix/exec-prefix/home or "
+ "install-base/install-platbase -- not both"
"must supply either prefix/exec-prefix/home or install-base/install-platbase -- not both"
)

if self.home and (self.prefix or self.exec_prefix):
Expand Down
2 changes: 1 addition & 1 deletion distutils/command/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def send_metadata(self): # noqa: C901
log.info('Server response (%s): %s', code, result)
else:
log.info('You will receive an email shortly.')
log.info('Follow the instructions in it to ' 'complete registration.')
log.info('Follow the instructions in it to complete registration.')
elif choice == '3':
data = {':action': 'password_reset'}
data['email'] = ''
Expand Down
3 changes: 1 addition & 2 deletions distutils/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,7 @@ def _show_help(
if display_options:
parser.set_option_table(self.display_options)
parser.print_help(
"Information display options (just display "
+ "information, ignore any commands)"
"Information display options (just display information, ignore any commands)"
)
print()

Expand Down
4 changes: 2 additions & 2 deletions distutils/fancy_getopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ def _check_alias_dict(self, aliases, what):
for alias, opt in aliases.items():
if alias not in self.option_index:
raise DistutilsGetoptError(
f"invalid {what} '{alias}': " f"option '{alias}' not defined"
f"invalid {what} '{alias}': option '{alias}' not defined"
)
if opt not in self.option_index:
raise DistutilsGetoptError(
f"invalid {what} '{alias}': " f"aliased option '{opt}' not defined"
f"invalid {what} '{alias}': aliased option '{opt}' not defined"
)

def set_aliases(self, alias):
Expand Down
1 change: 1 addition & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ extend-select = [
"W",

# local
"ISC",
"RUF010",
"RUF100",
"UP",
Expand Down