Skip to content

More control over verbosity levels#1855

Merged
rolandwalker merged 1 commit intomainfrom
RW/quiet-and-multi-verbose
Apr 20, 2026
Merged

More control over verbosity levels#1855
rolandwalker merged 1 commit intomainfrom
RW/quiet-and-multi-verbose

Conversation

@rolandwalker
Copy link
Copy Markdown
Contributor

Description

  • let --verbose be given multiple times, incrementing a counter
  • add --quiet option to reduce the verbosity level
  • let CLI arguments always override config-file defaults, in this case the main.less_chatty option, which is made equivalent to --quiet

This initial implementation respects three verbosity levels:

  • -1 (quiet)
  • 0 (default)
  • 1 (verbose)

and doesn't yet adopt new behaviors for verbosity levels 2 or 3.

Special-command verbosity is recast to avoid confusion with application-setting verbosity.

Motivation: enable debugging logs to the console with -vvv.

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

@rolandwalker rolandwalker self-assigned this Apr 18, 2026
@rolandwalker rolandwalker force-pushed the RW/quiet-and-multi-verbose branch from 574c783 to eb42669 Compare April 18, 2026 20:37
Comment thread mycli/main.py Outdated
@@ -1308,8 +1311,13 @@ class CliArgs:
)
verbose: bool = clickdc.option(
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.

Should this be int now that it's being used as a count? Looks like it's set to int in the tests already.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes! Fixed.

@rolandwalker rolandwalker force-pushed the RW/quiet-and-multi-verbose branch from eb42669 to 66e0929 Compare April 20, 2026 09:42
@rolandwalker rolandwalker requested a review from scottnemes April 20, 2026 09:43
 * let --verbose be given multiple times, incrementing a counter
 * add --quiet option to reduce the verbosity level
 * let CLI arguments always override config-file defaults, in this case
   the main.less_chatty option, which is made equivalent to --quiet

This initial implementation respects three verbosity levels:

 * -1 (quiet)
 * 0 (default)
 * 1 (verbose)

and doesn't yet adopt new behaviors for verbosity levels 2 or 3.

Special-command verbosity is recast to avoid confusion with application-
setting verbosity.

Motivation: enable debugging logs to the console with -vvv.
@rolandwalker rolandwalker force-pushed the RW/quiet-and-multi-verbose branch from 66e0929 to 6c11e51 Compare April 20, 2026 14:21
@rolandwalker rolandwalker merged commit e11adb0 into main Apr 20, 2026
8 checks passed
@rolandwalker rolandwalker deleted the RW/quiet-and-multi-verbose branch April 20, 2026 19:26
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.

2 participants