<commit_before>package uk.ac.wellcome.platform.reindex.reindex_worker.fixtures

import uk.ac.wellcome.platform.reindex.reindex_worker.dynamo.{
  MaxRecordsScanner,
  ParallelScanner,
  ScanSpecScanner
}
import uk.ac.wellcome.storage.fixtures.LocalDynamoDb
import uk.ac.wellcome.storage.fixtures.LocalDynamoDb.Table
import uk.ac.wellcome.test.fixtures.TestWith

import scala.concurrent.ExecutionContext.Implicits.global

trait DynamoFixtures extends LocalDynamoDb {
  def withScanSpecScanner[R](testWith: TestWith[ScanSpecScanner, R]): R = {
    val scanner = new ScanSpecScanner(dynamoDbClient)

    testWith(scanner)
  }

  def withParallelScanner[R](table: Table)(
    testWith: TestWith[ParallelScanner, R]): R = {
    withScanSpecScanner { scanSpecScanner =>
      val scanner = new ParallelScanner(
        scanSpecScanner = scanSpecScanner,
        dynamoConfig = createDynamoConfigWith(table)
      )

      testWith(scanner)
    }
  }

  def withMaxRecordsScanner[R](table: Table)(
    testWith: TestWith[MaxRecordsScanner, R]): R = {
    withScanSpecScanner { scanSpecScanner =>
      val scanner = new MaxRecordsScanner(
        scanSpecScanner = scanSpecScanner,
        dynamoConfig = createDynamoConfigWith(table)
      )

      testWith(scanner)
    }
  }
}
<commit_msg>And ditch the braces for legibility<commit_after>package uk.ac.wellcome.platform.reindex.reindex_worker.fixtures

import uk.ac.wellcome.platform.reindex.reindex_worker.dynamo.{
  MaxRecordsScanner,
  ParallelScanner,
  ScanSpecScanner
}
import uk.ac.wellcome.storage.fixtures.LocalDynamoDb
import uk.ac.wellcome.storage.fixtures.LocalDynamoDb.Table
import uk.ac.wellcome.test.fixtures.TestWith

import scala.concurrent.ExecutionContext.Implicits.global

trait DynamoFixtures extends LocalDynamoDb {
  def withScanSpecScanner[R](testWith: TestWith[ScanSpecScanner, R]): R = {
    val scanner = new ScanSpecScanner(dynamoDbClient)

    testWith(scanner)
  }

  def withParallelScanner[R](table: Table)(
    testWith: TestWith[ParallelScanner, R]): R =
    withScanSpecScanner { scanSpecScanner =>
      val scanner = new ParallelScanner(
        scanSpecScanner = scanSpecScanner,
        dynamoConfig = createDynamoConfigWith(table)
      )

      testWith(scanner)
    }

  def withMaxRecordsScanner[R](table: Table)(
    testWith: TestWith[MaxRecordsScanner, R]): R =
    withScanSpecScanner { scanSpecScanner =>
      val scanner = new MaxRecordsScanner(
        scanSpecScanner = scanSpecScanner,
        dynamoConfig = createDynamoConfigWith(table)
      )

      testWith(scanner)
    }
}

{'fraction_non_alphanumeric': 0.08921644685802949, 'fraction_numerical': 0.0, 'mean_word_length': 4.158, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4050822', 'n_tokens_mistral': 865, 'n_tokens_neox': 847, 'n_words': 135}