Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit: bump repositories #843

Merged
merged 2 commits into from
Jan 24, 2025
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
hooks:
- id: prettier
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
rev: v0.9.2
hooks:
- id: ruff
args: [--fix, --show-fixes]
Expand Down
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
Loading