Skip to content

Commit f37e62f

Browse files
authored
fix warning messages (clj-python#171)
1 parent e66c3dd commit f37e62f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/libpython_clj2/metadata.clj

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@
347347
(map? v)
348348
(has-attr? target-item k))
349349
(let [att-val (get-attr target-item k)]
350+
(ns-unmap ns-symbol (symbol k))
350351
(intern ns-symbol
351352
(with-meta (symbol k)
352353
(if no-arglists?
@@ -370,9 +371,13 @@
370371
(when (map? v)
371372
(cond
372373
(contains? (:flags v) :callable?)
373-
(intern ns-symbol (with-meta (symbol k) v)
374-
(fn [inst & args]
375-
(apply (get-attr inst k) args)))
374+
(do
375+
(ns-unmap ns-symbol (symbol k))
376+
(intern ns-symbol (with-meta (symbol k) v)
377+
(fn [inst & args]
378+
(apply (get-attr inst k) args))))
376379
(contains? v :value)
377-
(intern ns-symbol (with-meta (symbol k) v) (:value v)))))
380+
(do
381+
(ns-unmap ns-symbol (symbol k))
382+
(intern ns-symbol (with-meta (symbol k) v) (:value v))))))
378383
ns-symbol)

0 commit comments

Comments
 (0)