<commit_before>import os
import sys

from dodo_commands import CommandError, Dodo
from dodo_commands.dependencies.get import plumbum
from dodo_commands.framework.util import query_yes_no

local = plumbum.local


def _count_confirm_in_argv():
    result = 0
    for arg in sys.argv:
        if arg == "--confirm":
            result += 1
        if arg.startswith("-") and not arg.startswith("--"):
            result += arg.count("c")
        if arg == "--":
            break
    return result


def _count_echo_in_argv():
    result = 0
    for arg in sys.argv:
        if arg == "--echo":
            result += 1
        if arg.startswith("-") and not arg.startswith("--"):
            result += arg.count("e")
        if arg == "--":
            break
    return result<commit_msg>Fix: expect multiple "--" when counting --confirm or --echo in sys.argv<commit_after>import os
import sys

from dodo_commands import CommandError, Dodo
from dodo_commands.dependencies.get import plumbum
from dodo_commands.framework.util import query_yes_no

local = plumbum.local


def _count_confirm_in_argv():
    result = 0
    counting = True
    for arg in sys.argv:
        if counting:
            if arg == "--confirm":
                result += 1
            if arg.startswith("-") and not arg.startswith("--"):
                result += arg.count("c")
        if arg == "--":
            counting = not counting
    return result


def _count_echo_in_argv():
    result = 0
    counting = True
    for arg in sys.argv:
        if counting:
            if arg == "--echo":
                result += 1
            if arg.startswith("-") and not arg.startswith("--"):
                result += arg.count("e")
        if arg == "--":
            counting = not counting
    return result
{'fraction_non_alphanumeric': 0.11698537682789652, 'fraction_numerical': 0.0044994375703037125, 'mean_word_length': 1.9356435643564356, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '677874', 'n_tokens_mistral': 523, 'n_tokens_neox': 512, 'n_words': 158}