From c35d44e5924e10c03f431c4c2cd4aa79c6785b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20V=C3=A4is=C3=A4nen?= Date: Sat, 23 Sep 2023 10:02:47 +0300 Subject: [PATCH] Update `-seqable-or-rest` arg list no need to match accept argument signature use only children and opts. --- src/malli/clj_kondo.cljc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/malli/clj_kondo.cljc b/src/malli/clj_kondo.cljc index 0e824fb37..102dbdbe3 100644 --- a/src/malli/clj_kondo.cljc +++ b/src/malli/clj_kondo.cljc @@ -124,15 +124,15 @@ (defmethod accept :qualified-symbol [_ _ _ _] :symbol) (defmethod accept :uuid [_ _ _ _] :any) ;;?? -(defn -seqable-or-rest [_ _ [child] {:keys [arity]}] +(defn -seqable-or-rest [[child] {:keys [arity]}] (if (= arity :varargs) {:op :rest :spec child} :seqable)) -(defmethod accept :+ [_ _ children options] (-seqable-or-rest nil nil children options)) -(defmethod accept :* [_ _ children options] (-seqable-or-rest nil nil children options)) -(defmethod accept :? [_ _ children options] (-seqable-or-rest nil nil children options)) -(defmethod accept :repeat [_ _ children options] (-seqable-or-rest nil nil children options)) +(defmethod accept :+ [_ _ children options] (-seqable-or-rest children options)) +(defmethod accept :* [_ _ children options] (-seqable-or-rest children options)) +(defmethod accept :? [_ _ children options] (-seqable-or-rest children options)) +(defmethod accept :repeat [_ _ children options] (-seqable-or-rest children options)) (defmethod accept :cat [_ _ children _] children) (defmethod accept :catn [_ _ children _] (mapv last children))