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.ci] pre-commit autoupdate #2774

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repos:


- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.2
hooks:
- id: ruff
args: ["--fix", "--unsafe-fixes"]
Expand All @@ -53,7 +53,7 @@ repos:
args: ["-l", "79"]

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.6
rev: v19.1.7
hooks:
- id: clang-format
args: ["--style={BasedOnStyle: WebKit, ColumnLimit: 79, AlignConsecutiveMacros: Consecutive, AlignTrailingComments: Always}"]
Expand Down
2 changes: 1 addition & 1 deletion cx_Freeze/command/bdist_appimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def run(self) -> None:
Terminal=true
X-AppImage-Arch={ARCH}
X-AppImage-Name={self.target_name}
X-AppImage-Version={self.target_version or ''}
X-AppImage-Version={self.target_version or ""}
"""
self.save_as_file(
dedent(desktop_entry),
Expand Down
6 changes: 2 additions & 4 deletions cx_Freeze/command/bdist_mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ class bdist_mac(Command):
(
"bundle-name=",
None,
"File name for the bundle application "
"without the .app extension.",
"File name for the bundle application without the .app extension.",
),
(
"plist-items=",
Expand Down Expand Up @@ -97,8 +96,7 @@ class bdist_mac(Command):
(
"codesign-resource-rules",
None,
"Plist file to be passed to "
"codesign's --resource-rules option.",
"Plist file to be passed to codesign's --resource-rules option.",
),
(
"absolute-reference-path=",
Expand Down
4 changes: 2 additions & 2 deletions cx_Freeze/freezer.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ def _populate_zip_options(
invalid = sorted(zip_include_packages & zip_exclude_packages)
if invalid:
msg = (
f"package{'s' if len(invalid)>1 else ''} "
f"package{'s' if len(invalid) > 1 else ''} "
f"{', '.join(invalid)!r} "
"cannot be both included and excluded from zip file"
)
Expand Down Expand Up @@ -1040,7 +1040,7 @@ def _default_bin_includes(self) -> list[str]:
py_version = f"{PYTHON_VERSION}{ABI_THREAD}"
names = [
f"python{sys.version_info[0]}.dll",
f"python{py_version.replace('.','')}.dll",
f"python{py_version.replace('.', '')}.dll",
]
python_shared_libs: list[Path] = []
for name in names:
Expand Down
2 changes: 1 addition & 1 deletion cx_Freeze/winmsvcr_repack.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def get_msvcr_files(
cache_base = Path(os.path.expandvars("${APPDATA}"))
else:
cache_base = Path("~/.cache").expanduser()
cache_dir = cache_base / f"cx_Freeze/vc_redist/{ version }"
cache_dir = cache_base / f"cx_Freeze/vc_redist/{version}"
cache_dir.mkdir(parents=True, exist_ok=True)
filename = cache_dir / name
unpack_dir = cache_dir / name.replace(".", "_")
Expand Down
3 changes: 1 addition & 2 deletions samples/pythonnet-demo/wordpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ def InitializeComponent(self) -> None:
self.label1.Size = System.Drawing.Size(296, 140)
self.label1.TabIndex = 2
self.label1.Text = (
"Python Wordpad - an example winforms "
"application using Python.NET"
"Python Wordpad - an example winforms application using Python.NET"
)

self.AutoScaleBaseSize = System.Drawing.Size(5, 13)
Expand Down
3 changes: 1 addition & 2 deletions samples/tkinter/test_tkinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
def _test() -> None:
root = Tk()
text = (
f"This is Tcl/Tk version {TclVersion}\n"
"This should be a cedilla: \xe7"
f"This is Tcl/Tk version {TclVersion}\nThis should be a cedilla: \xe7"
)
label = Label(root, text=text)
label.pack()
Expand Down
6 changes: 3 additions & 3 deletions tests/test_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ def test_find_spec(self, tmp_path: Path, fix_module_finder) -> None:
create_package(tmp_path, source=FIND_SPEC_TEST[4])
fix_module_finder.path.insert(0, os.fspath(tmp_path / "find_spec"))
module = fix_module_finder.include_module("hello")
assert (
"dummypackage" in module.global_names
), "packages that raises exceptions should still be imported"
assert "dummypackage" in module.global_names, (
"packages that raises exceptions should still be imported"
)
2 changes: 1 addition & 1 deletion tests/test_freezer.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def test_freezer_default_bin_includes(tmp_path: Path, monkeypatch) -> None:
if IS_MINGW:
expected = f"libpython{py_version}.dll"
elif IS_WINDOWS:
expected = f"python{py_version.replace('.','')}.dll"
expected = f"python{py_version.replace('.', '')}.dll"
elif IS_CONDA: # macOS or Linux
if IS_MACOS:
expected = f"libpython{py_version}.dylib"
Expand Down
Loading