<commit_before>import PropTypes from 'prop-types'

import selectionTypes from './selectionTypes'

export default PropTypes.shape({
  entityName: PropTypes.string.isRequired,
  ids: (props, propName, componentName) => {
    if (props.selection && props.selection.type === selectionTypes.ID && !props.selection[propName]) {
      return new Error(`Selection.ids prop not defined. Component: ${componentName}'.`)
    }
  },
  query: (props, propName, componentName) => {
    if (props.selection && props.selection.type === selectionTypes.QUERY && !props.selection[propName]) {
      return new Error(`Selection.query prop not defined. Component: ${componentName}'.`)
    }
  },
  type: PropTypes.oneOf(Object.keys(selectionTypes)).isRequired,
  count: PropTypes.number
}).isRequired
<commit_msg>refactor(tocco-util): remove isRequired from propType<commit_after>import PropTypes from 'prop-types'

import selectionTypes from './selectionTypes'

export default PropTypes.shape({
  entityName: PropTypes.string.isRequired,
  ids: (props, propName, componentName) => {
    if (props.selection && props.selection.type === selectionTypes.ID && !props.selection[propName]) {
      return new Error(`Selection.ids prop not defined. Component: ${componentName}'.`)
    }
  },
  query: (props, propName, componentName) => {
    if (props.selection && props.selection.type === selectionTypes.QUERY && !props.selection[propName]) {
      return new Error(`Selection.query prop not defined. Component: ${componentName}'.`)
    }
  },
  type: PropTypes.oneOf(Object.keys(selectionTypes)).isRequired,
  count: PropTypes.number
})

{'fraction_non_alphanumeric': 0.14197148171109733, 'fraction_numerical': 0.0, 'mean_word_length': 4.703180212014134, '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': '6193009', 'n_tokens_mistral': 449, 'n_tokens_neox': 457, 'n_words': 107}