<commit_before>from __future__ import print_function
import sys
import argparse

__all__ = ["add_libname_arguments"]

# grumble, grumble, we want to support multiple -R arguments like coqc
class CoqLibnameAction(argparse.Action):
    non_default = False
#     def __init__(self, *args, **kwargs):
#         super(CoqLibnameAction, self).__init__(*args, **kwargs)
    def __call__(self, parser, namespace, values, option_string=None):
#        print('%r %r %r' % (namespace, values, option_string))
        if not self.non_default:
            setattr(namespace, self.dest, [])
            self.non_default = True
        getattr(namespace, self.dest).append(tuple(values))<commit_msg>Error on -R foo bar<commit_after>from __future__ import print_function
import sys
import argparse

__all__ = ["add_libname_arguments"]

# grumble, grumble, we want to support multiple -R arguments like coqc
class CoqLibnameAction(argparse.Action):
    non_default = False
#     def __init__(self, *args, **kwargs):
#         super(CoqLibnameAction, self).__init__(*args, **kwargs)
    def __call__(self, parser, namespace, values, option_string=None):
#        print('%r %r %r' % (namespace, values, option_string))
        if not self.non_default:
            setattr(namespace, self.dest, [])
            self.non_default = True
        if values[0] != '.':
            print('ERROR: Only `-R . %s` is supported, not `-R %s %s`' % (values[1], values[0], values[1]), file=sys.stderr)
            sys.exit(0)
        getattr(namespace, self.dest).append(tuple(values))
{'fraction_non_alphanumeric': 0.12757731958762886, 'fraction_numerical': 0.0032216494845360823, 'mean_word_length': 3.5542521994134897, 'pattern_counts': {'":': 0, '<': 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': '308322', 'n_tokens_mistral': 484, 'n_tokens_neox': 481, 'n_words': 126}