Skip to content

fix: use logger instead of print() in _agent_config.py - #3966

Open
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/agent-config-use-logger
Open

fix: use logger instead of print() in _agent_config.py#3966
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/agent-config-use-logger

Conversation

@Quratulain-bilal

Copy link
Copy Markdown
Contributor

Problem

_agent_config.py used print(..., file=sys.stderr) for warnings instead of using the logging module.

Fix

Add logging.getLogger(name) and replace print() with logger.warning(). Remove unused sys import.

Replace print(..., file=sys.stderr) with logger.warning() for
consistent logging behavior. Removes unused sys import.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Replaces direct stderr warning output with module-level logging.

Changes:

  • Adds a module logger.
  • Replaces print(..., file=sys.stderr) with logger.warning().
  • Removes the unused sys import.
Show a summary per file
File Description
src/specify_cli/_agent_config.py Routes invalid integration warnings through logging.

Review details

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

f"recognized integration; falling back to '{DEFAULT_INIT_INTEGRATION}'. "
f"Choose from: {', '.join(sorted(AGENT_CONFIG.keys()))}.",
file=sys.stderr,
logger.warning(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants