chore(pre-commit): autoupdate
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
b3b129a03e
commit
a29c0008d8
2 changed files with 10 additions and 9 deletions
|
@ -7,7 +7,7 @@ repos:
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
repo: https://github.com/pre-commit/pre-commit-hooks
|
repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.5.0
|
rev: v5.0.0
|
||||||
|
|
||||||
- hooks:
|
- hooks:
|
||||||
- args:
|
- args:
|
||||||
|
@ -16,7 +16,7 @@ repos:
|
||||||
exclude: ^\.idea/fileTemplates/.*\.kt$
|
exclude: ^\.idea/fileTemplates/.*\.kt$
|
||||||
id: pretty-format-kotlin
|
id: pretty-format-kotlin
|
||||||
repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
|
repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
|
||||||
rev: v2.12.0
|
rev: v2.14.0
|
||||||
|
|
||||||
- hooks:
|
- hooks:
|
||||||
- id: commitizen
|
- id: commitizen
|
||||||
|
@ -24,4 +24,4 @@ repos:
|
||||||
stages:
|
stages:
|
||||||
- push
|
- push
|
||||||
repo: https://github.com/commitizen-tools/commitizen
|
repo: https://github.com/commitizen-tools/commitizen
|
||||||
rev: v3.15.0
|
rev: v4.0.0
|
||||||
|
|
|
@ -75,7 +75,8 @@ fun readInputAsCommaSeparatedInts(
|
||||||
fun readGraph(
|
fun readGraph(
|
||||||
day: Int,
|
day: Int,
|
||||||
name: String,
|
name: String,
|
||||||
) = readInput(day, name).fold(mapOf<String, Set<String>>()) { currentGraph, edge ->
|
) = readInput(day, name)
|
||||||
|
.fold(mapOf<String, Set<String>>()) { currentGraph, edge ->
|
||||||
val (fromVertex, toVertex) = edge.split("-")
|
val (fromVertex, toVertex) = edge.split("-")
|
||||||
val fromNeighbours = currentGraph.getOrDefault(fromVertex, emptySet()) + toVertex
|
val fromNeighbours = currentGraph.getOrDefault(fromVertex, emptySet()) + toVertex
|
||||||
val toNeighbours = currentGraph.getOrDefault(toVertex, emptySet()) + fromVertex
|
val toNeighbours = currentGraph.getOrDefault(toVertex, emptySet()) + fromVertex
|
||||||
|
|
Loading…
Reference in a new issue