Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and gaborbernat committed Jan 24, 2025
1 parent b554ba3 commit 905aee4
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/build/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]


Expand Down
2 changes: 1 addition & 1 deletion src/build/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/build/_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions src/build/_ctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ def __getattr__(name):


__all__ = [
'log_subprocess_error',
'LOGGER',
'VERBOSITY',
'log',
'log_subprocess_error',
'run_subprocess',
'LOGGER',
'verbosity',
'VERBOSITY',
]
2 changes: 1 addition & 1 deletion src/build/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,6 @@ def _find_executable_and_scripts(path: str) -> tuple[str, str, str]:


__all__ = [
'IsolatedEnv',
'DefaultIsolatedEnv',
'IsolatedEnv',
]
2 changes: 1 addition & 1 deletion tests/packages/test-no-prepare/backend_no_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/test_self_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 905aee4

Please sign in to comment.