style: linting

This commit is contained in:
Cilly Leang 2025-11-22 16:40:02 +11:00
parent 74e3278012
commit 42f06ebefa
Signed by: cilly
GPG key ID: 6500251E087653C9
11 changed files with 61 additions and 59 deletions

View file

@ -69,7 +69,7 @@ class PtvService() {
val cache = PtvCache()
private val client = HttpClient() {
private val client = HttpClient {
install(ContentNegotiation) {
json(Json {
ignoreUnknownKeys = true
@ -232,7 +232,7 @@ class PtvService() {
url {
appendPathSegments(
"route_type", routeType.asPtvType().ordinal.toString(),
"stop", stopId.toString(),
"stop", stopId,
)
parameter("expand", "Route")
parameter("expand", "Direction")

View file

@ -28,7 +28,7 @@ data class FutureTime(
fun FutureTime.asInt() =
trueHour * 3600 + minute * 60 + second
fun fromInt(int: Int) = FutureTime.from(
fun fromInt(int: Int) = from(
int / 3600,
(int / 60) % 60,
int % 60,

View file

@ -29,7 +29,7 @@ class CacheMap<K, V>(
}
override fun put(key: K, value: V): V? {
keyExpiries.put(key, counter + expiryMinutes + 1)
keyExpiries[key] = counter + expiryMinutes + 1
return innerMap.put(key, value)
}

View file

@ -28,7 +28,7 @@ class LoopFlow<T>(private val block: suspend FlowCollector<T>.() -> Unit) : Abst
fun <T> Flow<T>.delayFor(delay: Long) = apply {
@Suppress("UnusedFlow")
if (this is LoopFlow)
this.delayMs = delay;
this.delayMs = delay
else
throw IllegalStateException()
}
@ -36,7 +36,7 @@ class LoopFlow<T>(private val block: suspend FlowCollector<T>.() -> Unit) : Abst
fun <T> Flow<T>.initWith(block: suspend FlowCollector<T>.() -> Unit) = apply {
@Suppress("UnusedFlow")
if (this is LoopFlow)
this.init = block;
this.init = block
else
throw IllegalStateException()
}
@ -44,7 +44,7 @@ class LoopFlow<T>(private val block: suspend FlowCollector<T>.() -> Unit) : Abst
fun <T> Flow<T>.waitFor(waiter: suspend () -> Unit) = apply {
@Suppress("UnusedFlow")
if (this is LoopFlow)
this.waiter = waiter;
this.waiter = waiter
else
throw IllegalStateException()
}