Skip to content

refactor(scripts): use logging instead of print in the deploy credential guard #87

Closed

Description

@getdownandcode

Context

Follow-up from #84. scripts/check_deploy_credentials.py (lines 155-157) writes its failure report with print(..., file=sys.stderr). AGENTS.md §2.6 says: "Standard logging via logging.getLogger(__name__). Never use print()."

The guard is a CLI script whose stderr output is intentionally user-facing, so the rule was not applied. It should still follow the repository standard.

Acceptance criteria

  • Emit the header and one record per problem through a module logger configured with a stderr StreamHandler (no basicConfig side effects on import).
  • Keep the exit code (1) and the existing message text so the compose failure stays readable.
  • Update tests/unit/test_deploy_credentials.py::test_main_reports_problems_on_stderr to assert via caplog (or keep asserting captured stderr after configuring the handler).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions