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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ repos:
args: [--config-file=.yamllint]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 2700fd5671c633760d912769c041bfcde2b9a01b # frozen: v0.15.22
rev: cb8c523fd4835aba42af70f4cad5568db4df0b6c # frozen: v0.16.0
hooks:
- id: ruff
# Currently only src and tests contain Python files
Expand Down
3 changes: 1 addition & 2 deletions src/http_api_tool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"""

from ._version import __version__

from .cli import app, main
from .verifier import HTTPAPITester

__all__ = ["HTTPAPITester", "app", "main", "__version__"]
__all__ = ["HTTPAPITester", "__version__", "app", "main"]
2 changes: 1 addition & 1 deletion src/http_api_tool/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"""

import os
import sys
import subprocess
import sys
from typing import Any
from urllib.parse import urlparse, urlunparse

Expand Down Expand Up @@ -213,19 +213,19 @@
# Create a temporary verifier instance to use sanitization methods
temp_verifier = HTTPAPITester()

print("📋 Configuration:")

Check warning on line 216 in src/http_api_tool/cli.py

View workflow job for this annotation

GitHub Actions / Audit changes

aislop: ai-slop/python-print-debug

`print()` in production code — usually a leftover debug statement.
# Sanitize URL for logging
url = config.get("url", "Not specified")
if url != "Not specified":
url = temp_verifier.sanitize_url_for_logging(url)
print(f" URL: {url}")

Check warning on line 221 in src/http_api_tool/cli.py

View workflow job for this annotation

GitHub Actions / Audit changes

aislop: ai-slop/python-print-debug

`print()` in production code — usually a leftover debug statement.
print(f" HTTP Method: {config.get('http_method', 'GET')}")

Check warning on line 222 in src/http_api_tool/cli.py

View workflow job for this annotation

GitHub Actions / Audit changes

aislop: ai-slop/python-print-debug

`print()` in production code — usually a leftover debug statement.
print(f" Service Name: {config.get('service_name', 'API Service')}")

Check warning on line 223 in src/http_api_tool/cli.py

View workflow job for this annotation

GitHub Actions / Audit changes

aislop: ai-slop/python-print-debug

`print()` in production code — usually a leftover debug statement.
print(f" Expected HTTP Code: {config.get('expected_http_code', '200')}")

Check warning on line 224 in src/http_api_tool/cli.py

View workflow job for this annotation

GitHub Actions / Audit changes

aislop: ai-slop/python-print-debug

`print()` in production code — usually a leftover debug statement.
print(f" Retries: {config.get('retries', '3')}")

Check warning on line 225 in src/http_api_tool/cli.py

View workflow job for this annotation

GitHub Actions / Audit changes

aislop: ai-slop/python-print-debug

`print()` in production code — usually a leftover debug statement.
print(f" Timeout: {config.get('curl_timeout', '5')} seconds")

Check warning on line 226 in src/http_api_tool/cli.py

View workflow job for this annotation

GitHub Actions / Audit changes

aislop: ai-slop/python-print-debug

`print()` in production code — usually a leftover debug statement.
print(f" SSL Verification: {config.get('verify_ssl', 'true')}")

Check warning on line 227 in src/http_api_tool/cli.py

View workflow job for this annotation

GitHub Actions / Audit changes

aislop: ai-slop/python-print-debug

`print()` in production code — usually a leftover debug statement.
print(f" Follow Redirects: {config.get('follow_redirects', 'true')}")

Check warning on line 228 in src/http_api_tool/cli.py

View workflow job for this annotation

GitHub Actions / Audit changes

aislop: ai-slop/python-print-debug

`print()` in production code — usually a leftover debug statement.

# Show optional parameters if they're set
if config.get("regex"):
Expand Down
2 changes: 1 addition & 1 deletion src/http_api_tool/verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
command: The complete workflow command string.
"""
sys.stdout.flush()
sys.stdout.buffer.write(f"{command}\n".encode("utf-8"))
sys.stdout.buffer.write(f"{command}\n".encode())
sys.stdout.buffer.flush()

def _mask_credentials(self, username: str | None, password: str) -> None:
Expand Down Expand Up @@ -306,7 +306,7 @@
"on",
)

# Validate required URL only if this is called from GitHub Actions context

Check warning on line 309 in src/http_api_tool/verifier.py

View workflow job for this annotation

GitHub Actions / Audit changes

aislop: ai-slop/narrative-comment

Narrative comment block (cross-reference commentary)
# For CLI usage, the URL validation is handled in the typer command
if os.environ.get("GITHUB_ACTIONS"):
if not kwargs.get("url") and not os.environ.get("HTTP_API_URL"):
Expand Down
Loading