Skip to content

Commit f821a11

Browse files
pre-commit-ci[bot]henryiii
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f28bc0a commit f821a11

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

src/build/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
__version__ = '1.2.2.post1'
2222

2323
__all__ = [
24-
'__version__',
2524
'BuildBackendException',
2625
'BuildException',
2726
'BuildSystemTableValidationError',
28-
'check_dependency',
2927
'ConfigSettingsType',
3028
'DistributionType',
3129
'FailedProcessError',
3230
'ProjectBuilder',
3331
'RunnerType',
3432
'TypoWarning',
33+
'__version__',
34+
'check_dependency',
3535
]
3636

3737

src/build/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def main_parser() -> argparse.ArgumentParser:
323323
'--version',
324324
'-V',
325325
action='version',
326-
version=f"build {build.__version__} ({','.join(build.__path__)})",
326+
version=f'build {build.__version__} ({",".join(build.__path__)})',
327327
)
328328
parser.add_argument(
329329
'--verbose',

src/build/_builder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def metadata_path(self, output_directory: StrPath) -> str:
311311
if not match:
312312
msg = 'Invalid wheel'
313313
raise ValueError(msg)
314-
distinfo = f"{match['distribution']}-{match['version']}.dist-info"
314+
distinfo = f'{match["distribution"]}-{match["version"]}.dist-info'
315315
member_prefix = f'{distinfo}/'
316316
with zipfile.ZipFile(wheel) as w:
317317
w.extractall(

src/build/_ctx.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ def __getattr__(name):
8989

9090

9191
__all__ = [
92-
'log_subprocess_error',
92+
'LOGGER',
93+
'VERBOSITY',
9394
'log',
95+
'log_subprocess_error',
9496
'run_subprocess',
95-
'LOGGER',
9697
'verbosity',
97-
'VERBOSITY',
9898
]

src/build/env.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,6 @@ def _find_executable_and_scripts(path: str) -> tuple[str, str, str]:
367367

368368

369369
__all__ = [
370-
'IsolatedEnv',
371370
'DefaultIsolatedEnv',
371+
'IsolatedEnv',
372372
]

tests/packages/test-no-prepare/backend_no_prepare.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def build_wheel(wheel_directory, config_settings=None, metadata_directory=None):
1010
with open('pyproject.toml', 'rb') as f:
1111
metadata = tomllib.load(f)
1212

13-
wheel_basename = f"{metadata['project']['name'].replace('-', '_')}-{metadata['project']['version']}"
13+
wheel_basename = f'{metadata["project"]["name"].replace("-", "_")}-{metadata["project"]["version"]}'
1414
with zipfile.ZipFile(os.path.join(wheel_directory, f'{wheel_basename}-py3-none-any.whl'), 'w') as wheel:
1515
wheel.writestr(
1616
f'{wheel_basename}.dist-info/METADATA',

tests/test_integration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def test_build(request, monkeypatch, project, args, call, tmp_path):
113113
monkeypatch.setenv('SETUPTOOLS_SCM_PRETEND_VERSION', '0+dummy') # for the projects that use setuptools_scm
114114

115115
if call and call[0] == 'pyproject-build':
116-
exe_name = f"pyproject-build{'.exe' if sys.platform.startswith('win') else ''}"
116+
exe_name = f'pyproject-build{".exe" if sys.platform.startswith("win") else ""}'
117117
exe = os.path.join(os.path.dirname(sys.executable), exe_name)
118118
if os.path.exists(exe):
119119
call[0] = exe

tests/test_self_packaging.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,6 @@ def test_build_wheel(monkeypatch, tmpdir, args):
114114
names = z.namelist()
115115

116116
trimmed = {n for n in names if 'dist-info' not in n}
117-
trimmed |= {f"dist-info/{n.split('/', 1)[-1]}" for n in names if 'dist-info' in n}
117+
trimmed |= {f'dist-info/{n.split("/", 1)[-1]}' for n in names if 'dist-info' in n}
118118

119119
assert trimmed == wheel_files

0 commit comments

Comments
 (0)