<commit_before>### Defaults
_sbp_python_virtual_env_bg=${_sbp_python_virtual_env_bg:-$_sbp_color_dgreen}
_sbp_python_virtual_env_fg=${_sbp_python_virtual_env_fg:-$_sbp_color_white}

function _find_pyenv_version() {
  local path=${PWD%/*}
  while [[ $path ]]; do
    if [[ -f "${path}/.python-version" ]]; then
      cat "${path}/.python-version"
      break 
    else
      path=${path%/*}
    fi
  done
}

function _sbp_generate_python_virtual_env_segment() {
  local pyenv_value segment_value segment_value
  virtualenv_value="${VIRTUAL_ENV##*/}"
  pyenv_value=$(pyenv local 2>/dev/null)
  segment_value="${virtualenv_value}${pyenv_value}"
  
  if [[ -n "$segment_value" ]]; then
    _sbp_segment_new_color_bg="$_sbp_python_virtual_env_bg"
    _sbp_segment_new_color_fg="$_sbp_python_virtual_env_fg"
    _sbp_segment_new_length="$(( ${#segment_value} + 2 ))"
    _sbp_segment_new_value=" ${segment_value} "
    _sbp_segment_new_create
  fi
}<commit_msg>Remove extra pyenv nested check<commit_after>### Defaults
_sbp_python_virtual_env_bg=${_sbp_python_virtual_env_bg:-$_sbp_color_dgreen}
_sbp_python_virtual_env_fg=${_sbp_python_virtual_env_fg:-$_sbp_color_white}

function _sbp_generate_python_virtual_env_segment() {
  local pyenv_value segment_value segment_value
  virtualenv_value="${VIRTUAL_ENV##*/}"
  pyenv_value=$(pyenv local 2>/dev/null)
  segment_value="${virtualenv_value}${pyenv_value}"

  if [[ -n "$segment_value" ]]; then
    _sbp_segment_new_color_bg="$_sbp_python_virtual_env_bg"
    _sbp_segment_new_color_fg="$_sbp_python_virtual_env_fg"
    _sbp_segment_new_length="$(( ${#segment_value} + 2 ))"
    _sbp_segment_new_value=" ${segment_value} "
    _sbp_segment_new_create
  fi
}
{'fraction_non_alphanumeric': 0.12815990593768373, 'fraction_numerical': 0.0023515579071134627, 'mean_word_length': 6.530973451327434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6697371', 'n_tokens_mistral': 657, 'n_tokens_neox': 647, 'n_words': 78}