From 0ed4f26c86b14c509e648cfe7678c7a07164dfdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Tejero=20Cantero?= Date: Fri, 7 Aug 2026 03:02:32 +0200 Subject: [PATCH] :paperclip: Apply the project formatter to the graph namespaces `cljfmt check src/ test/` is a step of the Backend workflow and these two files did not pass it: an import block sorted the way a human reads it rather than the way the formatter sorts it, and a `cond` in `format-typed-value` indented one column short. Formatter output only. No semantic change. AI-assisted-by: mixed models --- backend/src/app/graph/arrow.clj | 16 +++++----- backend/src/app/graph/ladybug.clj | 52 +++++++++++++++---------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/backend/src/app/graph/arrow.clj b/backend/src/app/graph/arrow.clj index b698e3ab10..55be1b8b64 100644 --- a/backend/src/app/graph/arrow.clj +++ b/backend/src/app/graph/arrow.clj @@ -49,17 +49,13 @@ org.apache.arrow.memory.RootAllocator org.apache.arrow.vector.BigIntVector org.apache.arrow.vector.BitVector - org.apache.arrow.vector.FieldVector - org.apache.arrow.vector.Float8Vector - org.apache.arrow.vector.TimeStampMicroVector - org.apache.arrow.vector.UInt4Vector - org.apache.arrow.vector.VarCharVector - org.apache.arrow.vector.VectorSchemaRoot org.apache.arrow.vector.complex.ListVector org.apache.arrow.vector.complex.MapVector org.apache.arrow.vector.complex.StructVector + org.apache.arrow.vector.FieldVector + org.apache.arrow.vector.Float8Vector + org.apache.arrow.vector.TimeStampMicroVector org.apache.arrow.vector.types.FloatingPointPrecision - org.apache.arrow.vector.types.TimeUnit org.apache.arrow.vector.types.pojo.ArrowType$Bool org.apache.arrow.vector.types.pojo.ArrowType$FloatingPoint org.apache.arrow.vector.types.pojo.ArrowType$Int @@ -70,7 +66,11 @@ org.apache.arrow.vector.types.pojo.ArrowType$Utf8 org.apache.arrow.vector.types.pojo.Field org.apache.arrow.vector.types.pojo.FieldType - org.apache.arrow.vector.types.pojo.Schema)) + org.apache.arrow.vector.types.pojo.Schema + org.apache.arrow.vector.types.TimeUnit + org.apache.arrow.vector.UInt4Vector + org.apache.arrow.vector.VarCharVector + org.apache.arrow.vector.VectorSchemaRoot)) (set! *warn-on-reflection* true) diff --git a/backend/src/app/graph/ladybug.clj b/backend/src/app/graph/ladybug.clj index 386af1c5e2..81d117c26e 100644 --- a/backend/src/app/graph/ladybug.clj +++ b/backend/src/app/graph/ladybug.clj @@ -174,39 +174,39 @@ ([ladybug-type v] (format-typed-value ladybug-type v nil)) ([ladybug-type v map-key-fn] (let [v (values/coerce ladybug-type v)] - (cond - (nil? v) - "NULL" + (cond + (nil? v) + "NULL" - (list-type? ladybug-type) - (format-typed-list ladybug-type v) + (list-type? ladybug-type) + (format-typed-list ladybug-type v) - (map-type? ladybug-type) - (let [[key-type value-type] (values/map-types ladybug-type) - entries (seq v) - format-key (if (and map-key-fn (= "STRING" key-type)) - #(format-string (map-key-fn (key %))) - #(format-typed-value key-type (key %)))] - (str "map([" (str/join ", " (map format-key entries)) - "], [" - (str/join ", " (map #(format-typed-value value-type (val %)) entries)) - "])")) + (map-type? ladybug-type) + (let [[key-type value-type] (values/map-types ladybug-type) + entries (seq v) + format-key (if (and map-key-fn (= "STRING" key-type)) + #(format-string (map-key-fn (key %))) + #(format-typed-value key-type (key %)))] + (str "map([" (str/join ", " (map format-key entries)) + "], [" + (str/join ", " (map #(format-typed-value value-type (val %)) entries)) + "])")) - (struct-type? ladybug-type) - (format-struct ladybug-type v) + (struct-type? ladybug-type) + (format-struct ladybug-type v) - (= ladybug-type "JSON") - (format-json v) + (= ladybug-type "JSON") + (format-json v) - ;; Coerce string ids from transit edge-cases into UUID literals. - (= ladybug-type "UUID") - (format-uuid v) + ;; Coerce string ids from transit edge-cases into UUID literals. + (= ladybug-type "UUID") + (format-uuid v) - (= ladybug-type "TIMESTAMP") - (format-timestamp v) + (= ladybug-type "TIMESTAMP") + (format-timestamp v) - :else - (format-value v))))) + :else + (format-value v))))) (defn- ensure-semicolon [statement]