<commit_before>import Color, {IColor} from './colors/color';
import Variable from './variables/variable';
import './colors/extractors/hexa-extractor';
import './colors/extractors/rgb-extractor';
import './colors/extractors/browser-extractor';
import './colors/extractors/hsl-extractor';
import ColorExtractor from './colors/color-extractor';
import ColorDecoration from './colors/color-decoration';
import { Range, TextEditorDecorationType } from 'vscode';

interface DocumentLine {
  line: number;
  text: string;
}

interface LineExtraction {
  line: number;
  colors: IColor[];
}

const flattenLineExtractionsFlatten = arr => arr.reduce((a, b) => a.concat(Array.isArray(b) ? flattenLineExtractionsFlatten(b) : b), []).filter(_ => _.colors.length !== 0);

const WHITE = '#FFFFFF',
      BLACK = '#000000';

interface IDecoration {
  decoration: TextEditorDecorationType;
  /**
   * Disposed the TextEditorDecorationType
   * (destroy the colored background)
   *
   * @public
   * @memberOf IDecoration
   */
  dispose(): void;

  /**
   * Is `true` when the decoration has been destroyed, `false` otherwise.
   *
   * @public
   * @memberOf IDecoration
   */
  disposed: Boolean;

  /**
   * Generate the decoration Range (start and end position in line)
   *
   * @param {number} line
   * @returns {Range}
   *
   * @memberOf ColorDecoration
   */
  generateRange(line: number): Range;
}

class ColorUtil {
  public static textToFileLines(text: string): DocumentLine[] {
    return text.split(/\n/)
                .map((text, index) => Object({
                  'text': text,
                  'line': index
                }));
  }
  /**
   * Extract all colors from a text
   *
   * @static
   * @param {any} text
   * @returns {Promise < Color[] >}
   *
   * @memberOf ColorUtil
   */
  public static async findColors(fileContent: DocumentLine[], fileName = null): Promise < LineExtraction[] > {
    return await ColorExtractor.extract(fileContent);
  }
<commit_msg>Remove unecessary async/await<commit_after>import Color, {IColor} from './colors/color';
import Variable from './variables/variable';
import './colors/extractors/hexa-extractor';
import './colors/extractors/rgb-extractor';
import './colors/extractors/browser-extractor';
import './colors/extractors/hsl-extractor';
import ColorExtractor from './colors/color-extractor';
import ColorDecoration from './colors/color-decoration';
import { Range, TextEditorDecorationType } from 'vscode';

interface DocumentLine {
  line: number;
  text: string;
}

interface LineExtraction {
  line: number;
  colors: IColor[];
}

const flattenLineExtractionsFlatten = arr => arr.reduce((a, b) => a.concat(Array.isArray(b) ? flattenLineExtractionsFlatten(b) : b), []).filter(_ => _.colors.length !== 0);

const WHITE = '#FFFFFF',
      BLACK = '#000000';

interface IDecoration {
  decoration: TextEditorDecorationType;
  /**
   * Disposed the TextEditorDecorationType
   * (destroy the colored background)
   *
   * @public
   * @memberOf IDecoration
   */
  dispose(): void;

  /**
   * Is `true` when the decoration has been destroyed, `false` otherwise.
   *
   * @public
   * @memberOf IDecoration
   */
  disposed: Boolean;

  /**
   * Generate the decoration Range (start and end position in line)
   *
   * @param {number} line
   * @returns {Range}
   *
   * @memberOf ColorDecoration
   */
  generateRange(line: number): Range;
}

class ColorUtil {
  public static textToFileLines(text: string): DocumentLine[] {
    return text.split(/\n/)
                .map((text, index) => Object({
                  'text': text,
                  'line': index
                }));
  }
  /**
   * Extract all colors from a text
   *
   * @static
   * @param {any} text
   * @returns {Promise < Color[] >}
   *
   * @memberOf ColorUtil
   */
  public static findColors(fileContent: DocumentLine[], fileName = null): Promise < LineExtraction[] > {
    return ColorExtractor.extract(fileContent);
  }

{'fraction_non_alphanumeric': 0.13776541961577352, 'fraction_numerical': 0.003538928210313448, 'mean_word_length': 3.23661670235546, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '3704037', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1197, 'n_words': 304}