Skip to content

Commit 1032d44

Browse files
committed
allow blank ns-prefix
1 parent 7f57221 commit 1032d44

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libpython_clj2/codegen.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ user> (doto (python/list)
151151
exclude default-exclude}}]
152152
(let [metadata-fn (requiring-resolve
153153
'libpython-clj2.metadata/datafy-module-or-class)
154-
ns-symbol (or ns-symbol (symbol (str ns-prefix "." py-mod-or-cls)))]
154+
ns-symbol (or ns-symbol (symbol (str (when-not (s/blank? ns-prefix)
155+
(str ns-prefix "."))
156+
py-mod-or-cls)))]
155157
(py/with-gil-stack-rc-context
156158
(let [target (py/path->py-obj py-mod-or-cls)
157159
target-metadata (metadata-fn target)

0 commit comments

Comments
 (0)