<commit_before>package com.softwaremill.sttp

import com.softwaremill.sttp.Uri.{QueryFragment, UserInfo}
import org.scalatest.{FunSuite, Matchers}

class UriTests extends FunSuite with Matchers {

  val QF = QueryFragment

  val wholeUriTestData = List(
    Uri("http", None, "example.com", None, Nil, Nil, None) -> "http://example.com",
    Uri("https",
        None,
        "sub.example.com",
        Some(8080),
        List("a", "b", "xyz"),
        List(QF.KeyValue("p1", "v1"), QF.KeyValue("p2", "v2")),
        Some("f")) ->
      "https://sub.example.com:8080/a/b/xyz?p1=v1&p2=v2#f",
    Uri("http",
        None,
        "example.com",
        None,
        List(""),
        List(QF.KeyValue("p", "v"), QF.KeyValue("p", "v")),
        None) -> "http://example.com/?p=v&p=v",
    Uri("http",
        None,
        "exa mple.com",
        None,
        List("a b", "z", "ą:ę"),
        List(QF.KeyValue("p:1", "v&v"), QF.KeyValue("p2", "v v")),
        None) ->
      "http://exa%20mple.com/a%20b/z/%C4%85%3A%C4%99?p%3A1=v%26v&p2=v+v",
    Uri("http",
        Some(UserInfo("us&er", Some("pa ss"))),
        "example.com",
        None,
        Nil,
        Nil,
        None) ->
      "http://us%26er:pa%20ss@example.com",
  )
<commit_msg>Fix compile error<commit_after>package com.softwaremill.sttp

import com.softwaremill.sttp.Uri.{QueryFragment, UserInfo}
import org.scalatest.{FunSuite, Matchers}

class UriTests extends FunSuite with Matchers {

  val QF = QueryFragment

  val wholeUriTestData = List(
    Uri("http", None, "example.com", None, Nil, Nil, None) -> "http://example.com",
    Uri("https",
        None,
        "sub.example.com",
        Some(8080),
        List("a", "b", "xyz"),
        List(QF.KeyValue("p1", "v1"), QF.KeyValue("p2", "v2")),
        Some("f")) ->
      "https://sub.example.com:8080/a/b/xyz?p1=v1&p2=v2#f",
    Uri("http",
        None,
        "example.com",
        None,
        List(""),
        List(QF.KeyValue("p", "v"), QF.KeyValue("p", "v")),
        None) -> "http://example.com/?p=v&p=v",
    Uri("http",
        None,
        "exa mple.com",
        None,
        List("a b", "z", "ą:ę"),
        List(QF.KeyValue("p:1", "v&v"), QF.KeyValue("p2", "v v")),
        None) ->
      "http://exa%20mple.com/a%20b/z/%C4%85%3A%C4%99?p%3A1=v%26v&p2=v+v",
    Uri("http",
        Some(UserInfo("us&er", Some("pa ss"))),
        "example.com",
        None,
        Nil,
        Nil,
        None) ->
      "http://us%26er:pa%20ss@example.com"
  )

{'fraction_non_alphanumeric': 0.21631347461015593, 'fraction_numerical': 0.030387844862055178, 'mean_word_length': 2.3227091633466137, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '133675', 'n_tokens_mistral': 1043, 'n_tokens_neox': 982, 'n_words': 158}