diff --git a/src/build/__init__.py b/src/build/__init__.py index b50acf7d..1a203c84 100644 --- a/src/build/__init__.py +++ b/src/build/__init__.py @@ -21,17 +21,17 @@ __version__ = '1.2.2.post1' __all__ = [ - '__version__', 'BuildBackendException', 'BuildException', 'BuildSystemTableValidationError', - 'check_dependency', 'ConfigSettingsType', 'DistributionType', 'FailedProcessError', 'ProjectBuilder', 'RunnerType', 'TypoWarning', + '__version__', + 'check_dependency', ] diff --git a/src/build/__main__.py b/src/build/__main__.py index 8868a368..17086001 100644 --- a/src/build/__main__.py +++ b/src/build/__main__.py @@ -323,7 +323,7 @@ def main_parser() -> argparse.ArgumentParser: '--version', '-V', action='version', - version=f"build {build.__version__} ({','.join(build.__path__)})", + version=f'build {build.__version__} ({",".join(build.__path__)})', ) parser.add_argument( '--verbose', diff --git a/src/build/_builder.py b/src/build/_builder.py index 0546f4c0..c6802ac5 100644 --- a/src/build/_builder.py +++ b/src/build/_builder.py @@ -311,7 +311,7 @@ def metadata_path(self, output_directory: StrPath) -> str: if not match: msg = 'Invalid wheel' raise ValueError(msg) - distinfo = f"{match['distribution']}-{match['version']}.dist-info" + distinfo = f'{match["distribution"]}-{match["version"]}.dist-info' member_prefix = f'{distinfo}/' with zipfile.ZipFile(wheel) as w: w.extractall( diff --git a/src/build/_ctx.py b/src/build/_ctx.py index e65b24ea..7f10b2c4 100644 --- a/src/build/_ctx.py +++ b/src/build/_ctx.py @@ -89,10 +89,10 @@ def __getattr__(name): __all__ = [ - 'log_subprocess_error', + 'LOGGER', + 'VERBOSITY', 'log', + 'log_subprocess_error', 'run_subprocess', - 'LOGGER', 'verbosity', - 'VERBOSITY', ] diff --git a/src/build/env.py b/src/build/env.py index e583e682..b8c7b5f6 100644 --- a/src/build/env.py +++ b/src/build/env.py @@ -367,6 +367,6 @@ def _find_executable_and_scripts(path: str) -> tuple[str, str, str]: __all__ = [ - 'IsolatedEnv', 'DefaultIsolatedEnv', + 'IsolatedEnv', ] diff --git a/tests/packages/test-no-prepare/backend_no_prepare.py b/tests/packages/test-no-prepare/backend_no_prepare.py index dd8172b3..6a62ad1b 100644 --- a/tests/packages/test-no-prepare/backend_no_prepare.py +++ b/tests/packages/test-no-prepare/backend_no_prepare.py @@ -10,7 +10,7 @@ def build_wheel(wheel_directory, config_settings=None, metadata_directory=None): with open('pyproject.toml', 'rb') as f: metadata = tomllib.load(f) - wheel_basename = f"{metadata['project']['name'].replace('-', '_')}-{metadata['project']['version']}" + wheel_basename = f'{metadata["project"]["name"].replace("-", "_")}-{metadata["project"]["version"]}' with zipfile.ZipFile(os.path.join(wheel_directory, f'{wheel_basename}-py3-none-any.whl'), 'w') as wheel: wheel.writestr( f'{wheel_basename}.dist-info/METADATA', diff --git a/tests/test_integration.py b/tests/test_integration.py index 541e140e..5bdbccc0 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -113,7 +113,7 @@ def test_build(request, monkeypatch, project, args, call, tmp_path): monkeypatch.setenv('SETUPTOOLS_SCM_PRETEND_VERSION', '0+dummy') # for the projects that use setuptools_scm if call and call[0] == 'pyproject-build': - exe_name = f"pyproject-build{'.exe' if sys.platform.startswith('win') else ''}" + exe_name = f'pyproject-build{".exe" if sys.platform.startswith("win") else ""}' exe = os.path.join(os.path.dirname(sys.executable), exe_name) if os.path.exists(exe): call[0] = exe diff --git a/tests/test_self_packaging.py b/tests/test_self_packaging.py index b4589361..4fc5ebf8 100644 --- a/tests/test_self_packaging.py +++ b/tests/test_self_packaging.py @@ -114,6 +114,6 @@ def test_build_wheel(monkeypatch, tmpdir, args): names = z.namelist() trimmed = {n for n in names if 'dist-info' not in n} - trimmed |= {f"dist-info/{n.split('/', 1)[-1]}" for n in names if 'dist-info' in n} + trimmed |= {f'dist-info/{n.split("/", 1)[-1]}' for n in names if 'dist-info' in n} assert trimmed == wheel_files