Skip to content
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
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dynamic = [
]
dependencies = [
"beartype==0.22.9",
"click==8.4.2",
"click==8.5.0",
"pyyaml==6.0.3",
"vws-python==2026.8.26",
]
Expand All @@ -41,7 +41,7 @@ optional-dependencies.dev = [
"check-manifest==0.51",
"deptry==0.25.1",
"doc8==2.0.0",
"doccmd==2026.8.16",
"doccmd==2026.9.1",
"freezegun==1.5.5",
"furo==2025.12.19",
"hadolint-bin==2.15.1; sys_platform!='win32'",
Expand Down
3 changes: 2 additions & 1 deletion src/vws_cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
def _handle_vws_exceptions() -> Generator[None]:
"""Show error messages and catch exceptions from ``VWS-Python``."""
error_message = ""
error_stream = sys.stderr

try:
yield
Expand All @@ -62,7 +63,7 @@ def _handle_vws_exceptions() -> Generator[None]:
else:
return

click.echo(message=error_message, err=True)
click.echo(message=error_message, file=error_stream)
sys.exit(1)


Expand Down
3 changes: 2 additions & 1 deletion src/vws_cli/model_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
def _handle_model_target_exceptions() -> Generator[None]:
"""Show error messages and catch exceptions from ``VWS-Python``."""
error_message = ""
error_stream = sys.stderr

try:
yield
Expand All @@ -85,7 +86,7 @@ def _handle_model_target_exceptions() -> Generator[None]:
else:
return

click.echo(message=error_message, err=True)
click.echo(message=error_message, file=error_stream)
sys.exit(1)


Expand Down
3 changes: 2 additions & 1 deletion src/vws_cli/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ def _get_cloud_reco_error_message(exc: Exception) -> str:
@contextlib.contextmanager
def _handle_vwq_exceptions() -> Generator[None]:
"""Show error messages and catch exceptions from ``VWS-Python``."""
error_stream = sys.stderr
try:
yield
except (CloudRecoError, RequestEntityTooLargeError, ServerError) as exc:
error_message = _get_cloud_reco_error_message(exc=exc)
else:
return

click.echo(message=error_message, err=True)
click.echo(message=error_message, file=error_stream)
sys.exit(1)


Expand Down
3 changes: 2 additions & 1 deletion src/vws_cli/vumark.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class VuMarkFormatChoice(StrEnum):
def _handle_vumark_exceptions() -> Generator[None]:
"""Show error messages and catch exceptions from ``VWS-Python``."""
error_message = ""
error_stream = sys.stderr

try:
yield
Expand All @@ -78,7 +79,7 @@ def _handle_vumark_exceptions() -> Generator[None]:
else:
return

click.echo(message=error_message, err=True)
click.echo(message=error_message, file=error_stream)
sys.exit(1)


Expand Down
65 changes: 31 additions & 34 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading