Skip to content

Commit 7030d91

Browse files
mnriemCopilot
andcommitted
fix(workflows): keep cleanup warnings single-line and remove dead helper
Assisted-by: GitHub Copilot (model: MAI-Code-1-Flash, autonomous) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 9be19be commit 7030d91

3 files changed

Lines changed: 2 additions & 14 deletions

File tree

src/specify_cli/extensions/__init__.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,6 @@ def _load_core_command_names() -> frozenset[str]:
102102
CORE_COMMAND_NAMES = _load_core_command_names()
103103

104104

105-
def _fsync_file(path: Path) -> None:
106-
"""Best-effort fsync for a regular file."""
107-
try:
108-
with open(path, "rb") as handle:
109-
os.fsync(handle.fileno())
110-
except (AttributeError, OSError, NotImplementedError):
111-
pass
112-
113-
114105
def _fsync_directory(path: Path) -> None:
115106
"""Best-effort fsync for a directory path."""
116107
if not path.exists():

src/specify_cli/workflows/_commands.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,8 +1666,7 @@ def _validate_and_install_local(
16661666
except OSError as cleanup_exc:
16671667
console.print(
16681668
"[yellow]Warning:[/yellow] Could not remove temporary "
1669-
f"download file {_escape_markup(str(tmp_path))}: "
1670-
f"{_escape_markup(str(cleanup_exc))}"
1669+
f"workflow download file: {_escape_markup(str(cleanup_exc))}"
16711670
)
16721671
console.print(f"[red]Error:[/red] Failed to download workflow: {_escape_markup(str(exc))}")
16731672
raise typer.Exit(1)
@@ -1691,8 +1690,7 @@ def _validate_and_install_local(
16911690
except OSError as exc:
16921691
console.print(
16931692
"[yellow]Warning:[/yellow] Could not remove temporary "
1694-
f"download file {_escape_markup(str(tmp_path))}: "
1695-
f"{_escape_markup(str(exc))}"
1693+
f"workflow download file: {_escape_markup(str(exc))}"
16961694
)
16971695
return
16981696

tests/extensions/test_update_agent_context_feature_json.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
from tests.conftest import requires_bash
1313
from tests.extensions.test_extension_agent_context import (
14-
BASH,
1514
POWERSHELL,
1615
_bash_posix_path,
1716
_run_bash_agent_context_script,

0 commit comments

Comments
 (0)