Skip to content

Commit

Permalink
Update scalafix
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-vrijswijk committed Mar 18, 2024
1 parent ef6dc99 commit c9a17bf
Show file tree
Hide file tree
Showing 52 changed files with 80 additions and 81 deletions.
5 changes: 2 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import org.scalajs.linker.interface.ModuleSplitStyle
import scala.sys.process.*
import Dependencies.*
import org.scalajs.linker.interface.ModuleSplitStyle

val reactJS = "17.0.2"
import scala.sys.process.*

ThisBuild / Test / bspEnabled := false
ThisBuild / ScalafixConfig / bspEnabled.withRank(KeyRanks.Invisible) := false
Expand Down
6 changes: 4 additions & 2 deletions explore/src/clue/scala/queries/common/ProgramQueriesGQL.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import clue.GraphQLOperation
import clue.annotation.GraphQL
import lucuma.schemas.ObservationDB

import GroupQueriesGQL.*

object ProgramQueriesGQL {
@GraphQL
trait CreateProgramMutation extends GraphQLOperation[ObservationDB] {
Expand Down Expand Up @@ -50,7 +52,7 @@ object ProgramQueriesGQL {
val document: String = s"""#graphql
query ($$programId: ProgramId!) {
program(programId: $$programId) {
allGroupElements ${GroupQueriesGQL.GroupElementsSubQuery}
allGroupElements $GroupElementsSubQuery
}
}
"""
Expand All @@ -61,7 +63,7 @@ object ProgramQueriesGQL {
val document: String = s"""
subscription($$input: ProgramEditInput!) {
groupEdit(input: $$input) {
value ${GroupQueriesGQL.GroupSubQuery}
value $GroupSubQuery
editType
}
}
Expand Down
2 changes: 1 addition & 1 deletion explore/src/main/scala/explore/Explore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import clue.js.FetchMethod
import clue.js.WebSocketJSBackend
import clue.websocket.ReconnectionStrategy
import explore.components.ui.ExploreStyles
import explore.events.ExploreEvent
import explore.events.*
import explore.events.ExploreEvent
import explore.model.AppConfig
import explore.model.AppContext
import explore.model.ExploreLocalPreferences
Expand Down
4 changes: 2 additions & 2 deletions explore/src/main/scala/explore/ExploreLayout.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ import explore.cache.ProgramCache
import explore.components.ui.ExploreStyles
import explore.events.ExploreEvent
import explore.events.ExploreEvent.LogoutEventId
import explore.model.AppContext
import explore.model.*
import explore.model.AppContext
import explore.model.enums.AppTab
import explore.programs.ProgramsPopup
import explore.shortcuts.*
import explore.shortcuts.given
import explore.utils.*
import japgolly.scalajs.react.React
import japgolly.scalajs.react.*
import japgolly.scalajs.react.React
import japgolly.scalajs.react.extra.router.ResolutionWithProps
import japgolly.scalajs.react.extra.router.SetRouteVia
import japgolly.scalajs.react.vdom.html_<^.*
Expand Down
2 changes: 1 addition & 1 deletion explore/src/main/scala/explore/RoleSwitch.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package explore

import cats.effect.IO
import cats.syntax.all.*
import crystal.react.View
import crystal.react.*
import crystal.react.View
import japgolly.scalajs.react.*
import japgolly.scalajs.react.vdom.html_<^.*
import lucuma.core.model.StandardRole
Expand Down
4 changes: 2 additions & 2 deletions explore/src/main/scala/explore/Routing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import cats.data.NonEmptySet
import cats.syntax.all.*
import crystal.*
import crystal.react.View
import explore.model.*
import explore.model.Page
import explore.model.Page.*
import explore.model.*
import explore.proposal.ProposalTabContents
import explore.tabs.*
import explore.tabs.ConstraintsTabContents
import explore.tabs.ProgramTabContents
import explore.tabs.*
import explore.undo.UndoContext
import japgolly.scalajs.react.React
import japgolly.scalajs.react.ReactMonocle.*
Expand Down
2 changes: 1 addition & 1 deletion explore/src/main/scala/explore/TopBar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package explore

import cats.effect.IO
import cats.syntax.all.*
import crystal.react.View
import crystal.react.*
import crystal.react.View
import crystal.react.hooks.*
import explore.components.ConnectionsStatus
import explore.components.ui.ExploreStyles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ import explore.model.ObsAttachmentList
import explore.model.enums.AppTab
import explore.model.syntax.all.*
import explore.syntax.ui.*
import explore.utils.OdbRestClient
import explore.utils.*
import explore.utils.OdbRestClient
import fs2.dom
import japgolly.scalajs.react.Reusability
import japgolly.scalajs.react.*
import japgolly.scalajs.react.Reusability
import japgolly.scalajs.react.vdom.html_<^.*
import lucuma.core.model.ObsAttachment as ObsAtt
import lucuma.core.model.Observation
import lucuma.core.model.Program
import lucuma.core.model.{ObsAttachment => ObsAtt}
import lucuma.core.util.Enumerated
import lucuma.core.util.Timestamp
import lucuma.react.common.ReactFnProps
Expand All @@ -55,7 +55,7 @@ import lucuma.ui.reusability.given
import lucuma.ui.syntax.all.given
import lucuma.ui.table.*
import lucuma.ui.utils.*
import org.scalajs.dom.{File => DomFile}
import org.scalajs.dom.File as DomFile
import org.typelevel.log4cats.Logger

import scala.collection.immutable.SortedSet
Expand Down
6 changes: 3 additions & 3 deletions explore/src/main/scala/explore/attachments/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ import explore.model.ObsAttachment
import explore.model.ObsAttachmentList
import explore.model.syntax.all.*
import explore.syntax.ui.*
import explore.utils.OdbRestClient
import explore.utils.*
import explore.utils.OdbRestClient
import fs2.dom
import japgolly.scalajs.react.*
import lucuma.core.model.ObsAttachment as ObsAtt
import lucuma.core.model.Program
import lucuma.core.model.{ObsAttachment => ObsAtt}
import lucuma.core.util.Timestamp
import lucuma.react.primereact.Message
import lucuma.react.primereact.PrimeStyles
import lucuma.react.table.ColumnId
import lucuma.refined.*
import lucuma.schemas.enums.ObsAttachmentType
import lucuma.ui.primereact.LucumaPrimeStyles
import org.scalajs.dom.{File => DomFile}
import org.scalajs.dom.File as DomFile
import org.typelevel.log4cats.Logger

trait AttachmentUtils:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ import monocle.Optional
import monocle.Traversal
import queries.common.ObsQueriesGQL.ProgramObservationsDelta.Data.ObservationEdit
import queries.common.ProgramQueriesGQL.GroupEditSubscription.Data.GroupEdit
import queries.common.ProgramQueriesGQL.ProgramEditAttachmentSubscription.Data.{
ProgramEdit => AttachmentProgramEdit
}
import queries.common.ProgramQueriesGQL.ProgramEditAttachmentSubscription.Data.ProgramEdit as AttachmentProgramEdit
import queries.common.ProgramQueriesGQL.ProgramInfoDelta.Data.ProgramEdit
import queries.common.TargetQueriesGQL.ProgramTargetsDelta.Data.TargetEdit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import explore.model.enums.PlotRange
import explore.model.enums.TableId
import explore.model.enums.TimeDisplay
import explore.model.enums.Visible
import explore.model.itc.PlotDetails
import explore.model.itc.*
import explore.model.itc.PlotDetails
import explore.model.layout.*
import lucuma.core.math.Angle
import lucuma.core.math.Offset
Expand All @@ -42,11 +42,11 @@ import lucuma.react.gridlayout.*
import lucuma.react.table.*
import lucuma.ui.table.hooks.*
import org.typelevel.log4cats.Logger
import queries.common.UserPreferencesQueriesGQL.*
import queries.common.UserPreferencesQueriesGQL.AsterismPreferencesQuery.Data.ExploreAsterismPreferences
import queries.common.UserPreferencesQueriesGQL.AsterismUpsert
import queries.common.UserPreferencesQueriesGQL.UserGridLayoutUpdates.Data.LucumaGridLayoutPositions
import queries.common.UserPreferencesQueriesGQL.UserPreferencesQuery
import queries.common.UserPreferencesQueriesGQL.*
import queries.schemas.UserPreferencesDB
import queries.schemas.UserPreferencesDB.Enums.*
import queries.schemas.UserPreferencesDB.Types.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

package explore.components

import cats.Order.*
import cats.*
import cats.Order.*
import cats.syntax.all.*
import clue.FetchClient
import crystal.react.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ import lucuma.react.floatingui.syntax.*
import lucuma.react.primereact.Button
import lucuma.react.primereact.PrimeStyles
import lucuma.refined.*
import lucuma.schemas.ObservationDB.Types.WavelengthInput
import lucuma.schemas.ObservationDB.Types.*
import lucuma.schemas.ObservationDB.Types.WavelengthInput
import lucuma.schemas.model.CentralWavelength
import lucuma.schemas.model.ObservingMode
import lucuma.schemas.odb.input.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import lucuma.react.fa.FontAwesomeIcon
import lucuma.react.primereact.Button
import lucuma.react.primereact.Message
import lucuma.refined.*
import lucuma.ui.primereact.FormEnumDropdownView
import lucuma.ui.primereact.*
import lucuma.ui.primereact.FormEnumDropdownView
import lucuma.ui.primereact.given
import lucuma.ui.syntax.all.given
import monocle.Iso
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import crystal.*
import crystal.react.*
import crystal.react.hooks.*
import eu.timepit.refined.types.string.NonEmptyString
import explore.DefaultErrorPolicy
import explore.*
import explore.DefaultErrorPolicy
import explore.common.Aligner
import explore.components.ui.ExploreStyles
import explore.events.*
Expand All @@ -23,8 +23,8 @@ import explore.model.BasicConfigAndItc
import explore.model.ObsConfiguration
import explore.model.ScienceRequirements
import explore.model.WorkerClients.*
import explore.model.boopickle.ItcPicklers.given
import explore.model.boopickle.*
import explore.model.boopickle.ItcPicklers.given
import explore.model.itc.ItcTarget
import explore.modes.SpectroscopyModesMatrix
import explore.undo.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ import explore.model.BasicConfigAndItc
import explore.model.Progress
import explore.model.ScienceRequirements
import explore.model.WorkerClients.*
import explore.model.boopickle.ItcPicklers.given
import explore.model.boopickle.*
import explore.model.boopickle.ItcPicklers.given
import explore.model.display.*
import explore.model.display.given
import explore.model.enums.TableId
import explore.model.itc.ItcTarget
import explore.model.itc.*
import explore.model.itc.ItcTarget
import explore.model.reusability.given
import explore.modes.*
import japgolly.scalajs.react.*
import japgolly.scalajs.react.hooks.Hooks.UseRef
import japgolly.scalajs.react.vdom.html_<^.*
import lucuma.core.enums.FocalPlane
import lucuma.core.enums.*
import lucuma.core.enums.FocalPlane
import lucuma.core.math.*
import lucuma.core.model.*
import lucuma.core.syntax.all.*
Expand All @@ -55,13 +55,13 @@ import lucuma.react.syntax.*
import lucuma.react.table.*
import lucuma.refined.*
import lucuma.schemas.model.BasicConfiguration
import lucuma.typed.{tanstackVirtualCore => rawVirtual}
import lucuma.typed.tanstackVirtualCore as rawVirtual
import lucuma.ui.components.ThemeIcons
import lucuma.ui.primereact.*
import lucuma.ui.reusability.given
import lucuma.ui.syntax.all.given
import lucuma.ui.table.ColumnSize.*
import lucuma.ui.table.*
import lucuma.ui.table.ColumnSize.*
import lucuma.ui.table.hooks.*
import lucuma.ui.utils.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import monocle.Lens
import org.http4s.client.Client
import org.http4s.dom.FetchClientBuilder
import org.http4s.syntax.all.*
import org.scalajs.dom.{File => DOMFile}
import org.scalajs.dom.File as DOMFile
import org.typelevel.log4cats.Logger
import queries.common.TargetQueriesGQL

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import explore.utils.OdbRestClient
import japgolly.scalajs.react.*
import japgolly.scalajs.react.feature.ReactFragment
import japgolly.scalajs.react.vdom.html_<^.*
import lucuma.core.model.ObsAttachment as ObsAtt
import lucuma.core.model.Program
import lucuma.core.model.{ObsAttachment => ObsAtt}
import lucuma.react.common.ReactFnProps
import lucuma.react.primereact.Checkbox
import lucuma.react.primereact.Divider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import explore.utils.OdbRestClient
import japgolly.scalajs.react.*
import japgolly.scalajs.react.vdom.html_<^.*
import lucuma.core.math.Angle
import lucuma.core.model.ObsAttachment as ObsAtt
import lucuma.core.model.Observation
import lucuma.core.model.Program
import lucuma.core.model.{ObsAttachment => ObsAtt}
import lucuma.react.common.ReactFnProps
import lucuma.ui.components.SolarProgress
import lucuma.ui.reusability.given
Expand Down
2 changes: 1 addition & 1 deletion explore/src/main/scala/explore/findercharts/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import explore.utils.OdbRestClient
import japgolly.scalajs.react.*
import japgolly.scalajs.react.hooks.Hooks.UseState
import japgolly.scalajs.react.vdom.html_<^.*
import lucuma.core.model.ObsAttachment as ObsAtt
import lucuma.core.model.Program
import lucuma.core.model.{ObsAttachment => ObsAtt}
import lucuma.core.util.NewType
import lucuma.react.floatingui.Placement
import lucuma.react.floatingui.syntax.*
Expand Down
2 changes: 1 addition & 1 deletion explore/src/main/scala/explore/itc/ItcPlotControl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import lucuma.itc.ChartType
import lucuma.react.common.ReactFnProps
import lucuma.react.primereact.Button
import lucuma.refined.*
import lucuma.ui.primereact.SelectButtonEnumView
import lucuma.ui.primereact.*
import lucuma.ui.primereact.SelectButtonEnumView
import lucuma.ui.primereact.given
import lucuma.ui.syntax.all.given
import monocle.Prism
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import lucuma.react.highcharts.ResizingChart
import lucuma.react.resizeDetector.hooks.*
import lucuma.refined.*
import lucuma.typed.highcharts.highchartsStrings.line
import lucuma.typed.highcharts.mod.DashStyleValue
import lucuma.typed.highcharts.mod.*
import lucuma.typed.highcharts.mod.DashStyleValue
import lucuma.ui.syntax.all.given

import scala.scalajs.js
Expand Down
2 changes: 1 addition & 1 deletion explore/src/main/scala/explore/model/AppContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import clue.*
import clue.js.*
import clue.websocket.*
import eu.timepit.refined.types.string.NonEmptyString
import explore.events.ExploreEvent
import explore.events.*
import explore.events.ExploreEvent
import explore.model.enums.AppTab
import explore.utils
import explore.utils.ToastCtx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import lucuma.react.common.ReactFnProps
import lucuma.react.primereact.Button
import lucuma.react.primereact.InputSwitch
import lucuma.react.primereact.TooltipOptions
import lucuma.ui.primereact.EnumDropdownView
import lucuma.ui.primereact.*
import lucuma.ui.primereact.EnumDropdownView
import lucuma.ui.primereact.given
import lucuma.ui.syntax.all.given

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import explore.model.reusability.given
import explore.model.syntax.all.*
import explore.syntax.ui.*
import explore.undo.UndoSetter
import japgolly.scalajs.react.ScalaFnComponent
import japgolly.scalajs.react.*
import japgolly.scalajs.react.ScalaFnComponent
import japgolly.scalajs.react.vdom.TagOf
import japgolly.scalajs.react.vdom.html_<^.*
import lucuma.core.math.Coordinates
Expand All @@ -42,9 +42,9 @@ import lucuma.react.common.ReactFnProps
import lucuma.react.primereact.*
import lucuma.react.resizeDetector.hooks.*
import lucuma.react.syntax.*
import lucuma.react.table.*
import lucuma.react.table.ColumnDef
import lucuma.react.table.ColumnId
import lucuma.react.table.*
import lucuma.schemas.model.TargetWithId
import lucuma.ui.primereact.*
import lucuma.ui.reusability.given
Expand Down
4 changes: 2 additions & 2 deletions explore/src/main/scala/explore/observationtree/obsTree.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import eu.timepit.refined.cats.*
import eu.timepit.refined.types.numeric.NonNegShort
import explore.data.KeyedIndexedList
import explore.data.tree.KeyedIndexedTree
import explore.data.tree.{Node => IndexNode}
import explore.data.tree.{Tree => IndexTree}
import explore.data.tree.Node as IndexNode
import explore.data.tree.Tree as IndexTree
import explore.model.*
import explore.model.syntax.all.*
import lucuma.core.model.Group
Expand Down
Loading

0 comments on commit c9a17bf

Please sign in to comment.