<commit_before>import React, {PureComponent, PropTypes} from "react"
import cxs from "cxs"
import {connect} from "react-redux"
import {mergeDeep} from "ramda-extra"

import {primaryInteraction} from "@lacqueristas/styles"
import {secondaryInteraction} from "@lacqueristas/styles"

const styles = {
  primary: primaryInteraction,
  secondary: secondaryInteraction,
  normal: {},
}
const MIDDLE_CLICK = 0
const kinds = [
  "primary",
  "secondary",
  "normal",
]

export default connect()(class Anchor extends PureComponent {
  static propTypes = {
    dispatch: PropTypes.func.isRequired,
    children: PropTypes.node.isRequired,
    style: PropTypes.object.isRequired,
    href: PropTypes.string.isRequired,
    kind: PropTypes.oneOf(kinds).isRequired,
  }

  static defaultProps = {
    style: {},
    kind: "normal",
  }

  static contextTypes = {signals: PropTypes.shape({clickAnchor: PropTypes.func})}

  onClick (): Function {
    const {dispatch} = this.props
    const {signals: {clickAnchor}} = this.context

    return function trigger (event: Event) {
      const {target} = event
      const {metaKey} = event
      const {nativeEvent} = event
      const {which} = nativeEvent
      const {href} = target
      const isOpeningNewInstance = metaKey || which === MIDDLE_CLICK

      if (!isOpeningNewInstance) {
        event.preventDefault()

        return dispatch(clickAnchor(href))
      }

      return null
    }
  }

  render (): any {
    const {children} = this.props
    const {href} = this.props
    const {style} = this.props
    const {kind} = this.props
    const combineStyle = mergeDeep(
      styles[kind],
      style
    )

    return <a href={href} className={cxs(combineStyle)} onClick={this.onClick()}>
      {children}
    </a>
  }<commit_msg>Don't need there turn value<commit_after>import React, {PureComponent, PropTypes} from "react"
import cxs from "cxs"
import {connect} from "react-redux"
import {mergeDeep} from "ramda-extra"

import {primaryInteraction} from "@lacqueristas/styles"
import {secondaryInteraction} from "@lacqueristas/styles"

const styles = {
  primary: primaryInteraction,
  secondary: secondaryInteraction,
  normal: {},
}
const MIDDLE_CLICK = 0
const kinds = [
  "primary",
  "secondary",
  "normal",
]

export default connect()(class Anchor extends PureComponent {
  static propTypes = {
    dispatch: PropTypes.func.isRequired,
    children: PropTypes.node.isRequired,
    style: PropTypes.object.isRequired,
    href: PropTypes.string.isRequired,
    kind: PropTypes.oneOf(kinds).isRequired,
  }

  static defaultProps = {
    style: {},
    kind: "normal",
  }

  static contextTypes = {signals: PropTypes.shape({clickAnchor: PropTypes.func})}

  onClick (): Function {
    const {dispatch} = this.props
    const {signals: {clickAnchor}} = this.context

    return function trigger (event: Event) {
      const {target} = event
      const {metaKey} = event
      const {nativeEvent} = event
      const {which} = nativeEvent
      const {href} = target
      const isOpeningNewInstance = metaKey || which === MIDDLE_CLICK

      if (!isOpeningNewInstance) {
        event.preventDefault()

        dispatch(clickAnchor(href))
      }
    }
  }

  render (): any {
    const {children} = this.props
    const {href} = this.props
    const {style} = this.props
    const {kind} = this.props
    const combineStyle = mergeDeep(
      styles[kind],
      style
    )

    return <a href={href} className={cxs(combineStyle)} onClick={this.onClick()}>
      {children}
    </a>
  }
{'fraction_non_alphanumeric': 0.11885940146809712, 'fraction_numerical': 0.000564652738565782, 'mean_word_length': 3.357933579335793, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5098787', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1073, 'n_words': 273}