From 045923237e8bcfcf109ce0621485ba06182ccba0 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 22 Sep 2022 20:28:48 -0400 Subject: [PATCH] fix documentation for the --count option It erroneously claimed that it set the application exit code to 1 if the count was greater than 1. However, this is false, because the --count option doesn't modify the error code at any time. If the count was greater than 1, then the exit code was already 1, even in the absence of --count, unless --exit-zero was used. This documentation bug resulted in people reading the `flake8 --help` output and believing that --count is mandatory in order to ensure that flake8 produces errors in automated processes (such as CI scripts) when flake8 violations are detected. --- src/flake8/main/options.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flake8/main/options.py b/src/flake8/main/options.py index d603232..9b374ab 100644 --- a/src/flake8/main/options.py +++ b/src/flake8/main/options.py @@ -159,8 +159,8 @@ def register_default_options(option_manager: OptionManager) -> None: "--count", action="store_true", parse_from_config=True, - help="Print total number of errors to standard output and " - "set the exit code to 1 if total is not empty.", + help="Print total number of errors to standard output after " + "all other output.", ) add_option(