Skip to content

Commit

Permalink
Remove unnecessary 'import os.…' imports
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed Jan 10, 2023
1 parent c027683 commit 9374ea9
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package scala.build.tests.markdown

import scala.build.internal.markdown.{MarkdownCodeBlock, MarkdownCodeWrapper}
import com.eed3si9n.expecty.Expecty.expect
import os.RelPath

import scala.build.Position
import scala.build.errors.{BuildException, MarkdownUnclosedBackticksError}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package scala.cli.commands.dependencyupdate

import caseapp.*
import os.Path

import scala.build.actionable.ActionableDependencyHandler
import scala.build.actionable.ActionableDiagnostic.ActionableDependencyUpdateDiagnostic
Expand Down Expand Up @@ -101,7 +100,7 @@ object DependencyUpdate extends ScalaCommand[DependencyUpdateOptions] {
}

private def updateDependencies(
file: Path,
file: os.Path,
diagnostics: Seq[(Position.File, ActionableDependencyUpdateDiagnostic)]
): String = {
val fileContent = os.read(file)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package scala.cli.integration

import com.eed3si9n.expecty.Expecty.expect
import os.proc

import scala.cli.integration.util.BloopUtil

class BloopTests extends ScalaCliSuite {

def runScalaCli(args: String*): proc = os.proc(TestUtil.cli, args)
def runScalaCli(args: String*): os.proc = os.proc(TestUtil.cli, args)

private lazy val bloopDaemonDir =
BloopUtil.bloopDaemonDir(runScalaCli("directories").call().out.text())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -954,9 +954,8 @@ abstract class BspTestDefinitions(val scalaVersionOpt: Option[String])
test("workspace/reload --dependency option") {
val inputs = TestInputs(
os.rel / "ReloadTest.scala" ->
s"""import os.pwd
|object ReloadTest {
| println(pwd)
s"""object ReloadTest {
| println(os.pwd)
|}
|""".stripMargin
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package scala.cli.integration

import com.eed3si9n.expecty.Expecty.expect
import os.RelPath

import java.nio.file.Paths
import java.util.zip.ZipFile
Expand Down Expand Up @@ -41,9 +40,9 @@ abstract class PublishTestDefinitions(val scalaVersionOpt: Option[String])
val scalaSuffix: String =
if (actualScalaVersion.startsWith("3.")) "_3"
else "_" + actualScalaVersion.split('.').take(2).mkString(".")
val expectedArtifactsDir: RelPath =
val expectedArtifactsDir: os.RelPath =
os.rel / "org" / "virtuslab" / "scalacli" / "test" / s"simple$scalaSuffix" / "0.2.0-SNAPSHOT"
val expectedJsArtifactsDir: RelPath =
val expectedJsArtifactsDir: os.RelPath =
os.rel / "org" / "virtuslab" / "scalacli" / "test" / s"simple_sjs1$scalaSuffix" / "0.2.0-SNAPSHOT"
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package scala.cli.integration

import os.{CommandResult, Path}

import java.io.File
import java.net.ServerSocket
import java.util.Locale
Expand Down Expand Up @@ -129,13 +127,13 @@ object TestUtil {
def relPathStr(relPath: os.RelPath): String =
(Seq.fill(relPath.ups)("..") ++ relPath.segments).mkString(File.separator)

def kill(pid: Int): CommandResult =
def kill(pid: Int): os.CommandResult =
if (Properties.isWin)
os.proc("taskkill", "/F", "/PID", pid).call()
else
os.proc("kill", pid).call()

def pwd: Path =
def pwd: os.Path =
if (Properties.isWin)
os.Path(os.pwd.toIO.getCanonicalFile)
else
Expand Down
1 change: 0 additions & 1 deletion modules/options/src/main/scala/scala/build/Artifacts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import coursier.parse.RepositoryParser
import coursier.util.Task
import coursier.{Dependency => CsDependency, Fetch, Resolution, core => csCore, util => csUtil}
import dependency.*
import os.Path

import java.net.URL

Expand Down

0 comments on commit 9374ea9

Please sign in to comment.