<commit_before>import React from 'react'
import styled from 'styled-components'

import { Nodes } from '../../types'

const List = styled.ul`
  list-style-type: none;
`

const StyledCheckbox = styled.input`
  margin-right: 0.5rem;
  cursor: pointer;
`

interface Props {
  id: string
  nodes: Nodes
  onToggle(id: string): void
}

export const Checkbox = ({ id, nodes, onToggle }: Props) => {
  const node = nodes[id]
  const { text, childIds, checked } = node

  const handleChange = () => onToggle(id)

  return (
    <React.Fragment key={id}>
      {text && (
        <li>
          <label>
            <StyledCheckbox
              type='checkbox'
              checked={checked}
              onChange={handleChange}
            />
            {text}
          </label>
        </li>
      )}
      {childIds.length ? (
        <li>
          <List>
            {childIds.map((childId) => (
              <Checkbox
                key={childId}
                id={childId}
                nodes={nodes}
                onToggle={onToggle}
              />
            ))}
          </List>
        </li>
      ) : null}
    </React.Fragment>
  )
}
<commit_msg>Use consistent syntax for defining interface members<commit_after>import React from 'react'
import styled from 'styled-components'

import { Nodes } from '../../types'

const List = styled.ul`
  list-style-type: none;
`

const StyledCheckbox = styled.input`
  margin-right: 0.5rem;
  cursor: pointer;
`

interface Props {
  id: string
  nodes: Nodes
  onToggle: (id: string) => void
}

export const Checkbox = ({ id, nodes, onToggle }: Props) => {
  const node = nodes[id]
  const { text, childIds, checked } = node

  const handleChange = () => onToggle(id)

  return (
    <React.Fragment key={id}>
      {text && (
        <li>
          <label>
            <StyledCheckbox
              type='checkbox'
              checked={checked}
              onChange={handleChange}
            />
            {text}
          </label>
        </li>
      )}
      {childIds.length ? (
        <li>
          <List>
            {childIds.map((childId) => (
              <Checkbox
                key={childId}
                id={childId}
                nodes={nodes}
                onToggle={onToggle}
              />
            ))}
          </List>
        </li>
      ) : null}
    </React.Fragment>
  )
}

{'fraction_non_alphanumeric': 0.13221052631578947, 'fraction_numerical': 0.0016842105263157896, 'mean_word_length': 1.5411764705882354, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 34, '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': '5378863', 'n_tokens_mistral': 729, 'n_tokens_neox': 716, 'n_words': 161}