<commit_before>import 'package:flutter_github_scripts/github_datatypes.dart';
import 'package:flutter_github_scripts/github_queries.dart';
import 'package:args/args.dart';
import 'dart:collection';
import 'dart:io';

class Options {
  final _parser = ArgParser(allowTrailingOptions: false);
  ArgResults _results;
  DateTime get from => DateTime.parse(_results['from']);
  DateTime get to => DateTime.parse(_results['to']);
  bool get summarize => _results['summarize'];
  bool get showQueries => _results['queries'];
  bool get onlyCustomers => _results['customers'];
  int get deltaDays =>
      int.parse(_results['delta'] == null ? '7' : _results['delta']);
  int get exitCode => _results == null
      ? -1
      : _results['help']
          ? 0
          : null;
  Options(List<String> args) {
    _parser
      ..addFlag('help',
          defaultsTo: false, abbr: 'h', negatable: false, help: 'get usage')
      ..addOption('from',
          defaultsTo:
              DateTime.now().subtract(Duration(hours: 24 * 7)).toString(),
          abbr: 'f',
          help: 'from date, ISO format yyyy-mm-dd')
      ..addOption('to',
          defaultsTo: DateTime.now().toIso8601String(),
          abbr: 't',
          help: 'to date, ISO format yyyy-mm-dd')
      ..addFlag('summarize',
          abbr: 's',
          defaultsTo: false,
          help: 'Show only summary tables in markdown format.')
      ..addFlag('queries',
          abbr: 'q', defaultsTo: false, help: 'Show queries used')
      ..addFlag('customers',
          abbr: 'c',
          defaultsTo: false,
          help: 'Only show issues with customer labels')
      ..addOption('delta', abbr: 'd', help: 'delta between dates, default = 7');

    try {
      _results = _parser.parse(args);
      if (_results['help']) _printUsage();
    } on ArgParserException catch (e) {
      print(e.message);
      _printUsage();
    }
  }

  void _printUsage() {<commit_msg>Fix doc comment.<commit_after>import 'package:flutter_github_scripts/github_datatypes.dart';
import 'package:flutter_github_scripts/github_queries.dart';
import 'package:args/args.dart';
import 'dart:collection';
import 'dart:io';

class Options {
  final _parser = ArgParser(allowTrailingOptions: false);
  ArgResults _results;
  DateTime get from => DateTime.parse(_results['from']);
  DateTime get to => DateTime.parse(_results['to']);
  bool get summarize => _results['summarize'];
  bool get showQueries => _results['queries'];
  bool get onlyCustomers => _results['customers'];
  int get deltaDays =>
      int.parse(_results['delta'] == null ? '7' : _results['delta']);
  int get exitCode => _results == null
      ? -1
      : _results['help']
          ? 0
          : null;
  Options(List<String> args) {
    _parser
      ..addFlag('help',
          defaultsTo: false, abbr: 'h', negatable: false, help: 'get usage')
      ..addOption('from',
          defaultsTo:
              DateTime.now().subtract(Duration(hours: 24 * 7)).toString(),
          abbr: 'f',
          help: 'from date, ISO format yyyy-mm-dd')
      ..addOption('to',
          defaultsTo: DateTime.now().toIso8601String(),
          abbr: 't',
          help: 'to date, ISO format yyyy-mm-dd')
      ..addFlag('summarize',
          abbr: 's',
          defaultsTo: false,
          help: 'Show only summary tables in TSV format.')
      ..addFlag('queries',
          abbr: 'q', defaultsTo: false, help: 'Show queries used')
      ..addFlag('customers',
          abbr: 'c',
          defaultsTo: false,
          help: 'Only show issues with customer labels')
      ..addOption('delta', abbr: 'd', help: 'delta between dates, default = 7');

    try {
      _results = _parser.parse(args);
      if (_results['help']) _printUsage();
    } on ArgParserException catch (e) {
      print(e.message);
      _printUsage();
    }
  }

  void _printUsage() {
{'fraction_non_alphanumeric': 0.14909560723514212, 'fraction_numerical': 0.005684754521963824, 'mean_word_length': 2.7729044834307994, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '5200341', 'n_tokens_mistral': 1203, 'n_tokens_neox': 1180, 'n_words': 298}