Skip to content

Make color and other logging method params keyword-only#4912

Open
happz wants to merge 2 commits into
verbose-debug-levels-limitedfrom
logging-methods-keyword-args
Open

Make color and other logging method params keyword-only#4912
happz wants to merge 2 commits into
verbose-debug-levels-limitedfrom
logging-methods-keyword-args

Conversation

@happz
Copy link
Copy Markdown
Contributor

@happz happz commented May 20, 2026

It is very easy to log a message plus color name because when value is omitted, color name becomes the value argument. Prevent any doubt by making color & everything but the message - or key & value - keyword-only arguments.

Pull Request Checklist

  • implement the feature

It is very easy to log a message plus color name because when value is
omitted, color name becomes the `value` argument. Prevent any doubt by
making color & everything but the message - or key & value -
keyword-only arguments.
@happz happz requested a review from 4N0body5 as a code owner May 20, 2026 18:13
@happz happz added the code | style Code style changes not affecting functionality label May 20, 2026
@happz happz requested a review from KwisatzHaderach as a code owner May 20, 2026 18:13
@happz happz added this to planning May 20, 2026
@happz happz requested review from dav-pascual and lbrabec as code owners May 20, 2026 18:13
@happz happz added the code | no functional change "No Functional Change" intended. Patch should not change tmt's behavior in any way. label May 20, 2026
@github-project-automation github-project-automation Bot moved this to backlog in planning May 20, 2026
@happz happz added the ci | full test Pull request is ready for the full test execution label May 20, 2026
@happz happz moved this from backlog to review in planning May 20, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request converts logging method parameters, such as color, shift, and level, into keyword-only arguments across the codebase and updates all call sites. Update the warn method in tmt/log.py to make shift and stacklevel keyword-only with default values to ensure consistency with the warning method and other utility changes.

Comment thread tmt/log.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci | full test Pull request is ready for the full test execution code | no functional change "No Functional Change" intended. Patch should not change tmt's behavior in any way. code | style Code style changes not affecting functionality

Projects

Status: review

Development

Successfully merging this pull request may close these issues.

2 participants