Skip to content

More control over verbosity levels#1855

Open
rolandwalker wants to merge 1 commit intomainfrom
RW/quiet-and-multi-verbose
Open

More control over verbosity levels#1855
rolandwalker wants to merge 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
 * 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 574c783 to eb42669 Compare April 18, 2026 20:37
Comment thread mycli/main.py
@@ -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.

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