Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scalafmt #475

Merged
merged 3 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ docstrings.style = Asterisk
lineEndings = preserve
includeCurlyBraceInSelectChains = false
danglingParentheses.preset = true
spaces {
inImportCurlyBraces = true
}
optIn.annotationNewlines = true
newlines.alwaysBeforeMultilineDef = false

runner.dialect = scala213
rewrite.rules = [RedundantBraces]

rewrite.redundantBraces.generalExpressions = false
rewriteTokens = {
"⇒": "=>"
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/src/main/scala/zio/redis/BenchmarksUtils.scala
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package zio.redis

import cats.effect.{ IO => CatsIO }
import cats.effect.{IO => CatsIO}

import zio.logging.Logging
import zio.redis.codec.StringUtf8Codec
import zio.schema.codec.Codec
import zio.{ BootstrapRuntime, ZIO, ZLayer }
import zio.{BootstrapRuntime, ZIO, ZLayer}

trait BenchmarksUtils {
self: RedisClients with BootstrapRuntime =>
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/main/scala/zio/redis/RedisClients.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package zio.redis

import cats.effect.unsafe.implicits.global
import cats.effect.{ IO => CatsIO, _ }
import cats.effect.{IO => CatsIO, _}
import com.comcast.ip4s._
import dev.profunktor.redis4cats.RedisCommands
import dev.profunktor.redis4cats.data.RedisCodec
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/src/main/scala/zio/redis/hash/HDelBenchmarks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hDel, hSet }
import zio.redis.{BenchmarkRuntime, hDel, hSet}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -30,7 +30,7 @@ class HDelBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c => items.traverse_(it => c.send(cmd.hdel(Key.unsafeFrom(key), Key.unsafeFrom(it._1)))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hExists, hSet }
import zio.redis.{BenchmarkRuntime, hExists, hSet}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -30,7 +30,7 @@ class HExistsBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hGetAll, hSet }
import zio.redis.{BenchmarkRuntime, hGetAll, hSet}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -30,7 +30,7 @@ class HGetAllBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c => items.traverse_(_ => c.send(cmd.hgetall(Key.unsafeFrom(key)))))
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/src/main/scala/zio/redis/hash/HGetBenchmarks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hGet, hSet }
import zio.redis.{BenchmarkRuntime, hGet, hSet}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -30,7 +30,7 @@ class HGetBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hIncrBy, hSet }
import zio.redis.{BenchmarkRuntime, hIncrBy, hSet}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand Down Expand Up @@ -34,7 +34,7 @@ class HIncrbyBenchmarks extends BenchmarkRuntime {
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import cats.implicits.toFoldableOps
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.instances.list._
unsafeRun[LaserDiscClient](c =>
items.traverse_(it =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hIncrByFloat, hSet }
import zio.redis.{BenchmarkRuntime, hIncrByFloat, hSet}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand Down Expand Up @@ -33,7 +33,7 @@ class HIncrbyFloatBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hKeys, hSet }
import zio.redis.{BenchmarkRuntime, hKeys, hSet}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -30,7 +30,7 @@ class HKeysBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c => items.traverse_(_ => c.send(cmd.hkeys(Key.unsafeFrom(key)))))
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/src/main/scala/zio/redis/hash/HLenBenchmarks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hLen, hSet }
import zio.redis.{BenchmarkRuntime, hLen, hSet}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -30,7 +30,7 @@ class HLenBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c => items.traverse_(_ => c.send(cmd.hlen(Key.unsafeFrom(key)))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hSet, hmGet }
import zio.redis.{BenchmarkRuntime, hSet, hmGet}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -30,7 +30,7 @@ class HMGetBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hmSet }
import zio.redis.{BenchmarkRuntime, hmSet}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -29,7 +29,7 @@ class HMSetBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c =>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/src/main/scala/zio/redis/hash/HSetBenchmarks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hSet }
import zio.redis.{BenchmarkRuntime, hSet}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -29,7 +29,7 @@ class HSetBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hSetNx }
import zio.redis.{BenchmarkRuntime, hSetNx}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -29,7 +29,7 @@ class HSetNxBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hSet, hStrLen }
import zio.redis.{BenchmarkRuntime, hSet, hStrLen}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -28,7 +28,7 @@ class HStrLenBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, hSet, hVals }
import zio.redis.{BenchmarkRuntime, hSet, hVals}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -30,7 +30,7 @@ class HValsBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.implicits.toFoldableOps
import cats.instances.list._
unsafeRun[LaserDiscClient](c => items.traverse_(_ => c.send(cmd.hvals(Key.unsafeFrom(key)))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.duration._
import zio.redis.{ BenchmarkRuntime, blPop, rPush }
import zio.redis.{BenchmarkRuntime, blPop, rPush}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -31,7 +31,7 @@ class BlPopBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.instances.list._
import cats.syntax.foldable._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.duration._
import zio.redis.{ BenchmarkRuntime, brPop, rPush }
import zio.redis.{BenchmarkRuntime, brPop, rPush}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -31,7 +31,7 @@ class BrPopBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.instances.list._
import cats.syntax.foldable._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.duration._
import zio.redis.{ BenchmarkRuntime, brPopLPush, del, rPush }
import zio.redis.{BenchmarkRuntime, brPopLPush, del, rPush}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand Down Expand Up @@ -35,7 +35,7 @@ class BrPopLPushBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.instances.list._
import cats.syntax.foldable._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, del, lIndex, rPush }
import zio.redis.{BenchmarkRuntime, del, lIndex, rPush}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand Down Expand Up @@ -34,7 +34,7 @@ class LIndexBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.instances.list._
import cats.syntax.foldable._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LInsertBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import _root_.laserdisc.lists.listtypes._
import cats.instances.list._
import cats.syntax.foldable._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._

import zio.ZIO
import zio.redis.{ BenchmarkRuntime, lLen }
import zio.redis.{BenchmarkRuntime, lLen}

@State(Scope.Thread)
@BenchmarkMode(Array(Mode.Throughput))
Expand All @@ -28,7 +28,7 @@ class LLenBenchmarks extends BenchmarkRuntime {
@Benchmark
def laserdisc(): Unit = {
import _root_.laserdisc.fs2._
import _root_.laserdisc.{ all => cmd, _ }
import _root_.laserdisc.{all => cmd, _}
import cats.instances.list._
import cats.syntax.foldable._

Expand Down
Loading